Enable-Migrations -ContextTypeName <DbContext-Name-with-Namespaces> -MigrationsDirectory:<Migrations-Directory-Name>
Add-Migration -configuration <DbContext-Migrations-Configuration-Class-with-Namespaces> <Migrations-Name>
Update-Database -configuration <DbContext-Migrations-Configuration-Class-with-Namespaces> -Verbose
Install-Package EntityFramework
Enable-Migrations -EnableAutomaticMigrations
Add-Migration AddBlog
Update-Database -Verbose
Update-Database –TargetMigration: AddBlog
//撤回到原点
Update-Database –TargetMigration: $InitialDatabase
//生成sql脚本
Update-Database -Script -SourceMigration:"201309201643300_AddCity.cs" -TargetMigration:"201309201708043_ModifyCity.cs"