$ cd [ProjectFolder]/app
$ dotnet restore
restores the packages listed in the project's .csproj file and their dependencies
- Add a new migration with the specified name for the specified context. If there is a migrations folder, you can skip to Update Database
$ dotnet ef migrations add [MigrationName] -c [ContextName]
- Use the name "InitialModel" or "InitialCreate" for the first time in migrations.
$ dotnet ef migrations add InitialModel -c DBMasterContext
- If there are model modifications, name them according to what we have modified
$ dotnet ef migrations add UpdateColumnNameAuthor -c DBMasterContext
- updates the database schema to the latest migration for the specified context
$ dotnet ef database update -c [ContextName]
$ dotnet ef database update -c DBMasterContext
- run the application and watches for changes to the source code.
$ dotnet watch run