Creating the database

During the development phase of any application, there is a fairly high probability that your data model will change. When that happens, your EF Core model differs from the database schema and you have to delete the outdated database and create a new one based on the updated model.

This is all fun and games until you've done your first live implementation and your application runs in a production environment. You cannot go and drop a database just to change a few columns. You have to make sure the live data persists when you make any changes.

EF Core migrations is a nifty feature that allows us to make changes to the database schema instead of recreating the database and losing production data. There is a lot of functionality ...

Get C# 8 and .NET Core 3 Projects Using Azure - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.