Skip to content

Enum Flags and HasConversion<string>() #20094

Open

Description

Currently, there's nothing prevent an enum with the [Flags] attribute from also having a conversion to string when configuring the model: HasConversion<string>()

This works fine for client side evaluations but for server side, an issue arises when using enum.HasFlags() in a query since the generated SQL attempts to perform a bitwise & operation on a SQL string equivalent (e.g., varchar/nvarchar).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions