dotnet ef Migration

在项目根目录下打开执行


1.增加迁移

> dotnet ef migrations add 名字

2.删除最近一次的迁移 

> dotnet ef migrations remove

3.更新数据库 

>dotnet ef database update

4.生成脚本

>dotnet ef migrations script

5.还原数据库版本 

>dotnet ef database update 名字

原文地址:https://www.cnblogs.com/chongyao/p/9449791.html

原文地址:https://www.cnblogs.com/gaobing/p/12494320.html