Back to Developer Roadmap

Code First Migrations

src/data/roadmaps/aspnet-core/content/[email protected]

4.01008 B
Original Source

Code First Migrations

Code First Migrations is a feature of Entity Framework that enables you to change the model classes in your application and then propagate those changes to the database. When you use Code First Migrations, Entity Framework generates the necessary SQL commands to update the database schema to match the model classes.

To use Code First Migrations, you need to enable it in your Entity Framework application. This can be done by adding a reference to the Entity Framework Migrations NuGet package, and then enabling Migrations in your application.

Visit the following resources to learn more: