EF database migration

The following command to be executed in the "Package Manager Console":

Use Add-Migration [name] to create migration scripts

And then perform the migration script using the Update-Database (how to use the program to perform?)

If you want to migrate to roll back, you can: Update-Database -Migration: 0

Clear project in the migration code: Remove-Migration

Guess you like

Origin www.cnblogs.com/xwgli/p/12659469.html