enum example with Code First

enum example with Code First

Postby chopswil » Wed 18 Jan 2012 19:37

could you update your Code First sample, http://www.devart.com/blogs/dotconnect/ ... irstsample, to include how enums can be supported and use fluent model builder?

My real world problem is I have a class that I can't modify, it has an enum data type and I need to put the int value into a DB.
I need a fluent way, since I can't change the class, to say this class' enum data type maps to a given DB field and it is an int.
and I'd like to see an example of how to do linq against this field using enum values

edit: and bitwise enums too :)

thanks
chopswil
 
Posts: 3
Joined: Wed 18 Jan 2012 19:24

Postby Shalex » Fri 20 Jan 2012 16:39

There is no official support of enums in Entity Framework yet. Only particular support is available in Entity Framework June 2011 CTP. Enums will be fully supported in Entity Framework 5.0 (with .NET Framework 4.5).
Shalex
Devart Team
 
Posts: 5795
Joined: Thu 14 Aug 2008 12:44


Return to Entity Framework support