Can you help me to figure it out?
I have an ASP.NET Core Web API with identity server and Entity Framework, in a single solution with worker service. I saw that in ASP.NET MVC people connect them as separate “apps”, but I can’t figure it out how to connect them in such way in solution.
I can connect service worker in Web API startup, but in such way it just start. But I can’t connect it in service worker with possibility to get data from the DbContext
.
I tried to connect them via services.AddScoped
(I created additional service) but it worked only from Web API. And service worker just get an error.
2