ADO.NET Entity Framework: Update Wizard will not add tables

后端 未结 13 1423
陌清茗
陌清茗 2020-12-13 11:55

I added a new ADO.Net Entity Data Model into my project and used the Update Wizard to add tables into the model. Five of the selected tables were added to the design surfac

13条回答
  •  别那么骄傲
    2020-12-13 12:36

    One easy way I found was to (in SQL Server Management Studio) add an ID column of type INT, deselect "Allow Nulls", and under Column properties (of ID) >> Identity Specification >> check (Is Identity), and make sure increment is set.

    Once the above is done, go back to your .edmx window, right-click, and Update Model from Database.

提交回复
热议问题