What is dependency Injection?
Dependency Injection makes your application as decoupled and
loosely couple to your code. It use to resolving the dependency of your code.
It follow the Dependency Inversion principle of SOLID.
This is the way of injecting the code based on the feature
required in application.
There are basically three ways you can approach to implement
the dependency Injection.
1.
Using Property Getter and setter
2.
Using Constructor.
3.
Through Interface.
How Implement the
Dependency Injection in MVC using Unity?