Any problem with nesting dependency injection?

esam 6 Reputation points
2022-08-15T16:14:45.533+00:00

if my page/controller has a dependency injected by asp.net core , but this dependency have a dependency injected which have a dependency injected.... down to multiple levels for example.
is that the way DI is intended to be used?

any problem? performance?

any alternative approach ?

Developer technologies | ASP.NET | ASP.NET Core
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.