Enum Support for Entity Framework Database First

前端 未结 3 677
心在旅途
心在旅途 2020-12-11 01:12

I can find a bunch of tutorials on how to implement enum support for model first and code first like these:

http://msdn.microsoft.com/en-us/data/jj248772.aspx

<
3条回答
  •  旧时难觅i
    2020-12-11 01:46

    You should probably read this as well.

    Enum Types are not created in your model via Database-First actions

    • When you create an EDM from an existing database, Enums are not defined in your model.
    • Update Model from Database will preserve your declaration of Enum types, but again, will not detect Enum constructs from your database.

    I've seen a couple of solutions that use T4, but in my specific case its just adding unneeded complexity to my project. So I will give in and so the enums code-first.

提交回复
热议问题