Add migration
Add migration and update database
To add new table, add column, change column etc, update DatabaseContext and respective Model classes.
Now we add migration using
dotnet ef migrations add NewMigration
As EF Core detects DatabaseContextModelSnapshot has differences compared to DatabaseContextModelSnapshot, EF Core will generate relevant migration code in the migration file.
Update database to latest migration
dotnet ef database update