Issues using IDesignTimeDbContextFactory: Cannot connect to database and ambiguos constructors
I have 3 projects in my solution: Web API, ClassLibrary and MVC. I have a shared DbContext
which is located in ClassLibrary. I tried adding a migration in ClassLibrary and that failed because it is not an executable project. Searching online I found that in cases like this you must use a IDesignTimeDbContextFactory
and so I implemented one.