Unable to create an object of type 'MyContext'. For the different patterns supported at design time

前端 未结 9 2993
逝去的感伤
逝去的感伤 2021-02-19 16:42

I have ConsoleApplication on .NET Core and also i added my DbContext to dependencies, but howewer i have an error:

Unable to create an object of type \'My

9条回答
  •  花落未央
    2021-02-19 17:05

    In my case, I had two startup project in my solution, so setting the project that has the connection string as the only startup project fixed the issue

提交回复
热议问题