0
我使用实体框架代码首先的创建数据库 学习通过天青手机应用服务CS0246 C#中的类型或命名空间名称“ForeignKeyAttribute”找不到(是否缺少using指令或程序集引用?)
但我得到了一个错误,它看起来像
CS0246 C# The type or namespace name 'ForeignKeyAttribute'
could not be found (are you missing a using directive or an assembly reference?)
而且我心中已经È已经使用System.ComponentModel.DataAnnotations.Schema; 但它似乎不工作。
我该如何解决这个问题?
============================================== =======
最后,我解决它指的是这个! Why can't I reference System.ComponentModel.DataAnnotations?
EF哪个版本的,你定位? – mlapaglia
EntityFramework.dll,Runtime版本v4.0.30319:“( –
嗯,什么版本的.NET?http://stackoverflow.com/questions/20705040/entity-framework-modeling-with-net4-data-annotations-issue – mlapaglia