Quantcast
Viewing all articles
Browse latest Browse all 9386

How to Update the Model with Database Changes

Hi

I have a database created via SQL Server management studio then

I generated the model classes by running the following command from Package manager console in VS2017

Scaffold-DbContext "Server=serverdb;Database=MainDB;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Model -Context "MainContext"

Later I added  a new table and some fields in existing table again using SQL Server management studio

Can someone tell me what would be the command to run from Package manager console to update the model and make them in sync with the changes?

thanks and regards


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>