Do we need dependency injection in MVC, how does it help?

murtaza gandhi 81 Reputation points
2021-02-05T06:55:42.107+00:00

Hi,

What is the advantage of using dependency injection.

I have to work on a project using constructor dependency injection.

The service interface is passed to controller constructor.

Even the service has constructor.

How does this work?

I cannot find what initializes the service constructor.

Thanks,
Regards.

Developer technologies ASP.NET ASP.NET Core
0 comments No comments
{count} votes

Accepted answer
  1. Duane Arnold 3,216 Reputation points
    2021-02-05T18:13:42.8+00:00
    0 comments No comments

0 additional answers

Sort by: Most helpful

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.