如何使用实体框架中的枚举? [英] How to work with Enums in Entity Framework?
本文介绍了如何使用实体框架中的枚举?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
备注:我使用的是EF 3和Firebird。
解决方案
在EF 4中有一个更好的方法来做到这一点。不幸的是,它在EF 1中不起作用。
这里是另一种方法。
更新: 真实枚举支持已添加到 2011年6月EF CTP 。
What is the best way to work with Enums in Entity Framework?
Remarks: I'm using EF 3 and Firebird.
解决方案
There is a somewhat better way to do it in EF 4. Unfortunately, it won't work in EF 1.
Here's another approach.
Update: Real enum support was added in the June 2011 EF CTP.
这篇关于如何使用实体框架中的枚举?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文