迁移 [英] migrations
本文介绍了迁移的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您如何在软件包管理器控制台中克服这些问题?
已经在项目"ProjectName"中启用了迁移.要覆盖现有的迁移配置,请使用-Force参数.
How do you get past this in the package manager console?
Migrations have already been enabled in project 'ProjectName'. To overwrite the existing migrations configuration, use the -Force parameter.
推荐答案
请在Package Manager控制台中尝试以下命令
启用迁移-contexttypename YourDbContext -force
-contexttypename参数,当我们使用多个dbcontext时.
当我们使用信号上下文时,
启用迁移-force
Hi,
Please try below command in Package Manager Console
enable-migrations -contexttypename YourDbContext -force
-contexttypename parameter, when we are working with multiple dbcontext.
When we are using signle context then
enable-migrations -force
这篇关于迁移的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文