2016-08-23 29 views
0

我有2个迁移。首先是AddEmployee,其次是AddCustomer。我想使用代码优先迁移,但错误消息

我想运行:

Update-Database –TargetMigration: AddEmployee 

不过是表明:

超过一个迁移配置类型是在装配 'Konstructor' 找到。指定要使用的名称。

如何解决这个问题?

回答

0

您的项目中有两个上下文。您需要指定名称,如下所示:

Update-Database –TargetMigration: AddEmployee -ConfigurationTypeName MyContextConfiguration