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

poshe said…
Informative Blog post! Thankyou for sharing . Planning and prevention tips should be given to avoid accidents. POSHE Solutions Pvt. Ltd Chennai prides itself in its Accreditation with NEBOSH to offer HSE(Health Safety Environment) training courses on Nebosh course in Chennai with excellent trainers
Corporate Training - Safety Training in Chennai
Nebosh IGC Course in Chennai
Industrial Safety Diploma Course In Chennai
NEBOSH Course in Vizag
NEBOSH Course in Pondicherry

Popular posts from this blog

Solving Sonarqube :- Project was never analyzed. A regular analysis is required before a branch analysis

spark - pyspark reading from excel files