EntityFramework Migration 基本的命令语句

 

<!--以下在Nuget控制台中输入-->

Enable-Migrations [-EnableAutomaticMigrations]       设置当前项目启用数据库迁移   --若启用自动数据库迁移,则不需要构建基架。


Add-Migration "name"                  构建基架


Add-Migration InitialCreate -IgnoreChanges 以创建一个空的迁移。 

Update-Database [-Verbose]                进行数据库迁移
posted @ 2015-07-28 09:58  Freeman0769  阅读(326)  评论(0)    收藏  举报