Skip to main content

dotnet ef (EF Core Tools)

note

This document is under construction.

Overview

dotnet ef is a tool for creating and applying database migrations, dropping databases, and more from the command line in development using Entity Framework Core.

Main Commands

  • dotnet ef migrations add: Creates a new migration.
  • dotnet ef database update: Applies migrations to the database.
  • dotnet ef dbcontext scaffold: Generates DbContext and entity classes from an existing database (Reverse Engineering).

Installation

dotnet tool install --global dotnet-ef

(Detailed usage examples and best practices will be described here)