I'm getting exception when trying to resolve service like this IApplicationBuilder.ApplicationServices.GetServices<AdminPanelDbContext>(); and "ASPNETCORE_ENVIRONMENT": "Development" is set to development.
Exception:
Cannot resolve scoped service 'AdminPanel.DAL.DbContexts.AdminPanel.AdminPanelDbContext' from root provider.
but when i set "ASPNETCORE_ENVIRONMENT": "Production" everything works fine.
I looked under appsettnings.Development.json and there is nothing different from appsettings.json. Is there any other setting that is affecting this?