C# – How to propagate database changes to the .edmx file

centity-framework-4visual studio 2010

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?

Best Answer

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.