Reputation: 19
As the title indicates I Have an SQL server database already made and I excuted the following command to generate DBContext class and the model:
Scaffold-DbContext "connectionstring" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models
later on a table has been added through SQL server( Not through a model migration command)
is there a way to generate the related model for it and update the dbContext ?
if i re-excute the command above I would get Build Failed
Upvotes: 0
Views: 1489
Reputation: 19
you want to update model and context if it already exits then you can use update wizard to update model by clicking on edmx diagram , then right click on empty white space and click update model from db
Upvotes: 0