Net Core - EntityFrameWorkCore

一 mac执行dotnet ef报错

dotnet tool install --global dotnet-ef 

二 1.增加迁移

dotnet ef migrations add 名字 --context DBContext名字

2.删除最近一次的迁移 

 > dotnet ef migrations remove --context DBContext名字

3.更新数据库 

 >dotnet ef database update --context DBContext名字

4.生成脚本

 >dotnet ef migrations script --context DBContext名字

5.还原数据库版本 

>dotnet ef database update 名字 --context DBContext名字

待续

 

 

 

 
posted @ 2023-06-05 21:24  vba是最好的语言  阅读(9)  评论(0编辑  收藏  举报