在迁移数据的时候抛以下异常信息
使用的迁移命令:
add-migration Updatexxxx
异常信息 :
More than one DbContext was found. Specify which one to use. Use the '-Context' parameter for PowerShell commands and the '--context' parameter for dotnet commands.
这是DBContext导致的,需要指定具体的DBContext,正确迁移命令:
Add-Migration UpdateComment -Context xxxxDbContext
Update-Database UpdateComment -Context xxxxDbContext