Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I propagate database changes to my .edmx file?

I generated an .edmx file from database.

I want to know if I make changes to my database schema then how will those changes be reflected in my Entity Data Model Designer diagram? I made changes to my database schema but found the changes did not appear in my Entity Data Model Designer diagram. Can someone explain to me how to propagate database schema changes to my Entity Data Model Designer diagram?

like image 988
Thomas Avatar asked Mar 25 '11 13:03

Thomas


People also ask

How do you update an EDMX file with database changes?

Update the .edmx file when the Database changes In the Model Browser, right-click the . edmx file and select Update Model from Database. Expand the Tables, Views, and Stored Procedures nodes, and check the objects you want to add to the . edmx file.

How do I open a .edmx XML file?

Right-click on your EDMX file, select Open With…, then select XML (Text) Editor. Boom, there is your entire EDMX file as Visual Studio and . Net sees it, in all its XML wonderfulness.


1 Answers

I think what you are asking is if you change your schema, how is this then updated in your EDMX file?

  1. Open your EDMX file in Visual Studio
  2. Right click on the design surface
  3. Select 'Update Model from Database'
  4. Follow the wizard to 'Refresh' your model.

Your changes should now be visible on the design surface in the respective containers.

like image 64
MattC Avatar answered Sep 22 '22 05:09

MattC