I am using .net core 3.1 and I have configured AppDbContext in the Web application. I have another class library project and inside I've added reference of Webapplication. How do I use Web App Dbcontext in the class library?
I tried creating instance of AppDbContext in class as below.
public class CallService { private readonly IServiceProvider _service; private readonly AppDbContext _context; public CallService(AppDbContext context,IServiceProvider service) { _context = context; _service = service; } //... //... } But issue I am having is , Whenever I create instance of above class in Console Application, It requires me to pass 2 arguments. 