Inject AppDbContext with parameterized constructor
I'm trying to encapsulate the AppDbContext, so everything needed is passed in the constructor.
If I omit the "<IAppDbContext, AppDbContext>", it works for projects that have a reference to the Infrastructure, where AppDbContext resides. But if I want to use the IAppDbContext to inject it anywhere, it doesn't want to migrate.
The error:
"Unable to create an object of type 'AppDbContext'. "
If I omit the "<IAppDbContext, AppDbContext>", it works for projects that have a reference to the Infrastructure, where AppDbContext resides. But if I want to use the IAppDbContext to inject it anywhere, it doesn't want to migrate.
The error:
"Unable to create an object of type 'AppDbContext'. "