Ryan
Ryan

Reputation: 5546

Enum in Entity Framework - how to create it

I watched the video here: http://msdn.microsoft.com/en-US/data/jj248772, but I can't see the option to create an enum out of a property in the context menu. Also, I can't add one in the Model Browser. I have Visual studio 2012 and EF5, EntityFramework Assembly version 4.4.0.0

enter image description here

Upvotes: 2

Views: 111

Answers (1)

Ladislav Mrnka
Ladislav Mrnka

Reputation: 364399

Entity framework assembly version should be 5.0. You are most probably targeting .NET 4.0. You need .NET 4.5 to have enum support (you will need to uninstall EF package and install it again to get EF 5.0 once you change target .NET version).

Edit: EF 6.0 should provide enums for .NET 4.0 as well.

Upvotes: 3

Related Questions