Created
July 21, 2021 20:04
-
-
Save manoj-choudhari-git/dbc128b0fc198ec1708d4484f9f1b33c to your computer and use it in GitHub Desktop.
.NET EF Core - DOTNET CLI commands to create new database
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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