枚举 EF 5.0 - 数据库优先 [英] Enums EF 5.0 - Database First
本文介绍了枚举 EF 5.0 - 数据库优先的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果我使用数据库优先,我如何才能让我的上下文对象使用实体框架 5.0 中的枚举功能.
How can I make it so that my context objects uses the Enum feature in Entity Framework 5.0 if I am using Database First.
推荐答案
转到模型浏览器并创建一个新的枚举类型,然后转到您希望使用它的任何列并将其类型更改为您刚刚创建的枚举已创建.
Go to the model browser and create a new enum type, then go to whatever column you wish to use it on and change its type to the enum that you just created.
这篇关于枚举 EF 5.0 - 数据库优先的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文