enum example with Code First

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
chopswil
Posts: 3
Joined: Wed 18 Jan 2012 19:24

enum example with Code First

Post by 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

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by 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).

Post Reply