Scaffold-DbContext update existing model if database changes.


Simple and nice answer -> use Force options as shown below :-

Scaffold-DbContext "Server=localhost;Database=MyDatabase;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir DataModel -FORCE


Anyways if you would like to find out more about that, please jump into the following link.



Comments

Popular posts from this blog

gemini cli getting file not defined error

mongosh install properly

llama cpp running it in google colab