-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Support for multiple enums (flags) in EnumToStringConverter #20994
Comments
@risogolo this would require something like concatenating the different values in a comma-separated string, after discovering which exact values are set, which isn't trivial to do. I'm not sure it's a good idea for EF Core to do this out of the box. @ajcvickers we may want to detect [Flags] enums and emit an informative error, at least unless we decide to properly handle them. |
Duplicate of #20094 |
Thanks...
I'm not sure what value there is in storing a number in a string column (why not just store it in an int column), but yeah, it would work. |
Guys we are talking about EnumToStringConverter, I need to see string representation of enum in DB, so I guess numeric value does not make sence. |
@risogolo so what exact string representation are you looking for for |
something visible, for example "InProgress; NotCancelled" |
Seems like EnumToStringConverter / StringEnumConverter does not support enums with multiple combined options
InProgress = 1,
NotCancelled = 7,
State = InProgress | NotCancelled
any plans to support that?
The text was updated successfully, but these errors were encountered: