2 results found
AggregateException: Some services are not able to be constructed. Error while validating the service descriptor 'ServiceType: A Lifetime: Singleton ImplementationType: B': Cannot consume scoped service 'C' from singleton 'A'.
Dependency injection is an important technique in application programming in general and in asp.net core in particular. Dependency injection helps reduce the dependence of classes on each other while initializing them. Initializing instances of classes maybe only once for each request or when initiating the application, it helps make the short code and more maintainable.