Tag Archives forASP.NET Core DI

ASP.NET Core Dependency Injection – Cannot consume scoped service

When working with ASP.NET Core and it’s Dependency Injection container, you will likely run into an error that’s similar to this one: Some services are not able to be constructed (Error while validating the service descriptor ‘ServiceType: AspNetCoreDi.IMyConnectionManager Lifetime: Singleton ImplementationType: AspNetCoreDi.MyConnectionManager’: Cannot consume scoped service ‘AspNetCoreDi.IMyScopedService’ from singleton ‘AspNetCoreDi.IMyConnectionManager’.) This happens when you have […]

Continue reading