Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
.NET EF Core - DOTNET CLI commands to create new database
## Delete existing database
dotnet ef database update 0 --context UniversityContext
## Remove all existing migrations
dotnet ef migrations remove --context UniversityContext
## Add new migration
dotnet ef migrations add InitialCreate --context UniversityContext
## Apply migration to the database
dotnet ef database update --context UniversityContext
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment