What is the best way to work with Enums in Entity Framework?
Remarks: I'm using EF 3 againts Firebird.
What is the best way to work with Enums in Entity Framework?
Remarks: I'm using EF 3 againts Firebird.
This is one of those irritating things about EF. Will not be supporting it yet!
Or you can do something like:
public MyEnum MyEnumProperty
{
get { return (MyEnum) InnerEnumProperty; }
set { InnerEnumProperty = (int) value; }
}
But it makes me feel dirty.
There is a somewhat better way to do it in EF 4. Unfortunately, it won't work in EF 1.
Here's another approach.