Back to course

Database Migrations in EF Core

.NET Zero to Hero: Master C# and Modern App Development

Migrations

Migrations allow you to keep your database schema in sync with your C# model.

Commands:

  1. Create a migration: bash dotnet ef migrations add InitialCreate

  2. Update the database: bash dotnet ef database update