On an ASP.NET application I have a flag enum as follows:
[Flags]
enum Target : int {
None = 0,
Group = 1,
Student = 2,
Professor = 4,
All = Group |
The only difference between enum types with and without HasFlagAttribute
is how they are written when using .ToString()
(and maybe how they are parsed when using Enum.Parse). EF internally strips the information about enum type and is only using the underlying enum type (accounting for nullability).