Search code examples
asp.net-mvcentity-frameworkef-code-firstef-database-first

How to handle database changes


I am using Entity Framework with a database-first approach, and I made some changes to the database. I cannot see those changes in my application because I know I need to update it too. But how do I update my domain models classes in ASP.NET MVC? Please can anyone help me?


Solution

    1. Open your edmx file and Right click on your edmx diagram and select Update model from database

    enter image description here

    2.if you need to add/refresh the existing tables,select the tables under add/refresh button and finish

    save the changes and build your solution enter image description here