dotnet-ef
Entity Framework Core database migration tools
TLDR
Add migration
SYNOPSIS
dotnet ef command [options]
DESCRIPTION
dotnet ef is the Entity Framework Core CLI tools for database migrations and scaffolding. It enables code-first database development and reverse engineering from existing databases.
The migrations system tracks schema changes in code, generating incremental updates that can be applied to databases. Each migration is a class describing schema modifications.
dbcontext scaffold reverse-engineers a DbContext and entity classes from an existing database, useful for database-first development or migrating legacy databases.
PARAMETERS
COMMAND
Operation: migrations, database, dbcontext.migrations add NAME
Create new migration.migrations list
List available migrations.migrations remove
Remove last migration.database update [MIGRATION]
Apply migrations to database.dbcontext scaffold CONN PROVIDER
Generate code from database.--context NAME
DbContext class to use.--project PATH
Project containing DbContext.--help
Display help information.
CAVEATS
Requires Microsoft.EntityFrameworkCore.Tools package. EF Core version must match tooling. Large databases may scaffold slowly. Some database features may not scaffold perfectly.
HISTORY
dotnet ef is part of Entity Framework Core, Microsoft's modern ORM for .NET. EF Core was released with .NET Core in 2016 as a cross-platform rewrite of Entity Framework.
SEE ALSO
dotnet(1), dotnet-build(1)
