我正在尝试使用 EF Core 进行迁移,但出现错误 - 如何修复此错误?
PM> add-migration ini
Unable to create an object of type 'ApplicationContext'. Add an implementation of 'IDesignTimeDbContextFactory' to the project, or see https://go.microsoft.com/fwlink/?linkid=851728 for additional patterns supported at design time.
最佳答案
如果您有多个启动项目,也会发生这种情况 - 迁移时,只需选择一个(在 VS 中右键单击解决方案并设置启动项目...)
关于asp.net-core - EF Core 迁移错误 : "Unable to create an object of type ' ApplicationContext'",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51343295/