dotnet ef
Perform design-time development tasks for Entity Framework Core. More information: https://learn.microsoft.com/ef/core/cli/dotnet.
- Update the database to a specified migration:
dotnet ef database update
- Drop the database:
dotnet ef database drop
- List available
DbContexttypes:
dotnet ef dbcontext list
- Generate code for a
DbContextand entity types for a database:
dotnet ef dbcontext scaffold
- Add a new migration:
dotnet ef migrations add
- Remove the last migration, rolling back the code changes that were done for the latest migration:
dotnet ef migrations remove
- List available migrations:
dotnet ef migrations list
- Generate an SQL script from migrations range:
dotnet ef migrations script
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
