0Pricing
C# Academy · Lesson

Migrations & Schema Management

Create, apply, and roll back migrations to evolve your database schema safely.

What Are EF Core Migrations?

Migrations are code-generated files that describe incremental database schema changes. Instead of writing DDL SQL by hand, EF Core generates and applies it automatically, keeping code and database in sync.

Installing EF Core Tools

The EF Core CLI tool (dotnet-ef) must be installed globally (or as a local tool) to run migration commands from the terminal.

# Install globally
dotnet tool install --global dotnet-ef

# Verify
dotnet ef --version

# Required NuGet packages in your project:
# Microsoft.EntityFrameworkCore.Design
# Microsoft.EntityFrameworkCore.SqlServer (or Sqlite, etc.)

All lessons in this course

  1. DbContext & DbSet Basics
  2. Migrations & Schema Management
  3. CRUD Operations with EF Core
  4. Relationships: One-to-Many & Many-to-Many
← Back to C# Academy