开发者

How to add table in Entity Framework?

I have a project that I made in Asp.net with Entity Fram开发者_如何学Goework.

Now I want to add one or more tables in the database and one or more stored procedures. But entities not shows the new table.

How to show this?


Open edmx file, right click anywhere in the modal and select "Update Model from Database" and follow the instructions and choose the desired tables and SPs.

How to add table in Entity Framework?

Sometimes even after following these steps, your model will not get updated, close Visual Studio and restart it again. This has happened many times for me.


Sharique's answer is the good one. But I noticed a thing: when the Mapping Details window is active(near Error List, Output) and if you are trying to add a new Entity (right click the design surface, Add -> Entity), the popup dialog, "Add Entity" it won't show.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜