Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enum Flags and HasConversion<string>() #20094

Open
Tracked by #240
vflame opened this issue Feb 28, 2020 · 1 comment
Open
Tracked by #240

Enum Flags and HasConversion<string>() #20094

vflame opened this issue Feb 28, 2020 · 1 comment

Comments

@vflame
Copy link

vflame commented Feb 28, 2020

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
Projects
None yet
Development

No branches or pull requests

2 participants