I cant create my migrations, i dont know, i have the dbcontext and de model ok. I compile and i dont have errors in my code.
my db context is:
somebody knows if i am doing something wrong in the dbcontex?
CodePudding user response:
Make sure that context contains an empty constructor.
CodePudding user response:
This error can be the result of many different causes.
I would first try explicitly specifying the startup project in the command by using --startup-project YourStartupProject.csproj
, and the project in which the DbContext is defined using --project ProjectWithDbContext.csproj
. The two might also be the same project.
If this does not work, please also share the code in which you actually pass the options to your DbContext, like the connection string.