Entity Framework 命令

生成数据库迁移文件

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

猜你喜欢

转载自www.cnblogs.com/leehomlee/p/11568380.html
今日推荐