There is a somewhat better way to do it in EF 4. Unfortunately, it won’t work in EF 1.
Here’s another approach.
Update: Real enum support was added in the June 2011 EF CTP.
More Related Contents:
- Introducing FOREIGN KEY constraint may cause cycles or multiple cascade paths – why?
- LINQ to Entities does not recognize the method
- Like Operator in Entity Framework?
- How can I query for null values in entity framework?
- .NET Entity Framework and transactions
- Get Database Table Name from Entity Framework MetaData
- Convert Enum to String
- Can you use Microsoft Entity Framework with Oracle? [closed]
- “Items collection must be empty before using ItemsSource.”
- Undo changes in entity framework entities
- Update primary key value using entity framework
- ASP.NET MVC: Is Controller created for every request?
- EF LINQ include multiple and nested entities
- Cannot attach the file *.mdf as database
- Is is possible to check if an object is already attached to a data context in Entity Framework?
- Generate POCO classes in different project to the project with Entity Framework model
- How do I serialize an enum value as an int?
- How to map table splitting in EF Code First?
- instance of entity type cannot be tracked because another instance with same key value is tracked [closed]
- Changing the type of an (Entity Framework) entity that is part of an inheritance hierarchy
- Organizationally, where should I put common queries when using Entity Framework Code First?
- Entity Framework 4 Single() vs First() vs FirstOrDefault()
- Enum is Reference Type or Value Type?
- Using entity framework on multiple databases
- entity framework Unable to load the specified metadata resource [duplicate]
- Get the name of Enum value
- The model backing the ‘ApplicationDbContext’ context has changed since the database was created
- Entity Framework Find vs. Where
- ‘ObjectContext’ vs ‘DbContext’ in Entity Framework
- Using Entity Framework entities as business objects?