We have two options to add migrations and update database
1. Using Command line:
- To add migration "dotnet ef migrations add Initial" where 'Initial' is the name of migration.
- To Update database " dotnet ef database update" command will update database.
2. Using Package manager console:
- To add migration " Add-Migration Initial" where Initial is the name of Migration.
- To Update Database "Update-Databse -migration intial' will update databse.
- To Revert migration "Update-Database -Migration 0" will revert recently added migration.
No comments:
Post a Comment