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.

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,246 questions
0 comments No comments
{count} votes

Accepted answer

0 additional answers

Sort by: Most helpful