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

The specified initialization vector (IV) does not match the block size for this algorithm