实体框架在VS 2012中无法正常工作

时间:2013-09-12 06:27:42

标签: c# asp.net vb.net entity-framework-5

在Visual Studio 2012中执行以下步骤:

1)Create Class library project
2)add "ADO.NET entity data model" (i.e:edmx file).
3)after add database tables to model.
4)Go to edmx file ,then press right click --->properties
5)Change "Code Generation Strategy" from (None) to (default).
6)then ctrl + S to save your chang

ES。

我有很多错误,如下所示:

1-System.Data.Entity.DbContext' does not contain a definition for 'AddObject'
2-Ambiguity between 'ClassLibrary1.City.CityID' and 'ClassLibrary1.City.CityID'

问题是什么?

0 个答案:

没有答案