With EntityFramework’s support for enums, there is no longer any need to include lookup tables in the model. But I do want to have them in the database for integrity, even with code first. I’ve been thinking for some time about to handle enums with code first. The idea behind code first is to be… Continue reading Enums and Lookup Tables with EF Code First
Tag: Enum
[Flags] on Enums Make ToString() Smart
Putting the [Flags] attribute on an enum changes ToStrings behaviour. It generates a comma separated list. I’ve used enums a lot. I’ve occasionally used the [Flags] attribute too. But I’ve never paid attention to how ToString() changes behaviour when the [Flags] attribute is added. Not until a couple of days ago, when I learnt something… Continue reading [Flags] on Enums Make ToString() Smart