Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
216 views
in Technique[技术] by (71.8m points)

asp.net - How to add table in Entity Framework?

I have a project that I made in Asp.net with Entity Framework.

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?

question from:https://stackoverflow.com/questions/6466347/how-to-add-table-in-entity-framework

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.

enter image description here

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...