In this video we will discuss
1. How to keep domain models and database schema in sync using migrations in asp.net core
2. How to add a migration in asp.net core
3. How to remove a migration in asp.net core
4. How to apply the migration and update the database
5. How to undo a migration that is already applied and bring the database schema to it's previous state
6. What is the use of ModelSnapshot class and __EFMigrationsHistory table
Healthy diet is very important for both body and mind. We want to inspire you to cook and eat healthy. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking.
Text version of the video
Slides
ASP.NET Core Text Articles & Slides
ASP.NET Core Tutorial
Angular, JavaScript, jQuery, Dot Net & SQL Playlists
As we develop our application and add new features, our application domain classes change. When the domain classes change, the corresponding changes have to be made to the underlying database schema. Otherwise the database schema goes out of synch and the application does not work as expected.
However, it is important not to manually make these changes to the database schema. We use migrations to keep the database schema in sync as the application domain classes change.