Showing posts with label dependency Injection. Show all posts
Showing posts with label dependency Injection. Show all posts

Wednesday, 17 February 2016

Dependency Injection in MVC using Unity


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?