42-EF Core Migration

1-常用命令

 

 

1-由于2.1版本有点不一样,不会自动创建ApplicationUser类,发现合并没效果。暂时略

 

增加一个字段

E:\coding\netcore\IdentitySample>dotnet ef migrations add NewColumn

更新到数据库中

E:\coding\netcore\IdentitySample>dotnet ef database update

 

3.1-还原到指定migriations,首先删除还原数据字段

E:\coding\netcore\IdentitySample>dotnet ef database  update AddColumn

 

3.2-再利用 remove移动多余的属性

E:\coding\netcore\IdentitySample>dotnet ef migrations remove

 

 

生成脚本

E:\coding\netcore\IdentitySample>dotnet ef migrations script

 

posted @ 2018-07-27 23:42  深圳丶追  阅读(128)  评论(0编辑  收藏  举报