I upgraded my ASP.NET project from Entity Framework Core 1.1. to Entity Framework Core 2.
I have a class library that targets the .net framework.
I have multiple DBContext in my class library
When I run the command Add-Migration MyMigration
I get
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.
I then run Add-Migration MyMigration -Context MyContext
I then get
Unable to create an object of type 'MyContext'. Add an implementation of 'IDesignTimeDbContextFactory' to the project, or see https://go.microsoft.com/fwlink/?linkid=851728 for additional patterns supported at design time.
This command use to work