[英]Entity Framework error when using Model First to generate code
As can be seen in the above image, I've defined an Entity Customer
with a primary key Id
, a FirstName
and a LastName
. 如上图所示,我已经定义了一个带有主键
Id
, FirstName
和LastName
的Entity Customer
。 I saved the model file and tried to build the solution. 我保存了模型文件并尝试构建解决方案。 I got the following build errors:
我遇到以下构建错误:
Im using Entity Framework 5 on Visual Studio 2012. My purpose is to design the model and then have the database code generated. 我在Visual Studio 2012上使用Entity Framework5。我的目的是设计模型,然后生成数据库代码。 Any idea what might be wrong?
知道有什么问题吗?
Here is some more info: 这是更多信息:
EDIT. 编辑。 Even more info:
更多信息:
转到模型浏览器,然后在其中删除重复的属性。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.