Entity Framework 命令

拜拜、爱过 提交于 2019-11-30 06:27:46

生成数据库迁移文件

dotnet ef migrations add v1

列出数据库迁移文件

dotnet ef migrations list

移除最后一个数据库迁移文件

dotnet ef migrations remove

生成数据库迁移 sql 脚本

dotnet ef migrations script [arguments] [Options]
arguments:
    <From>: The starting migration
    <To>    : The ending migration
Options:
       -o   :  The file to write the Result to

更新数据库迁移文件

dotnet ef database update

删除数据库

dotnet ef database drop

 

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!