Unity Container implementation in MVC Application
I was reading about the dependency injection and unity container for a while but never get a chance to implement it in real project. Luckily, I got a task to design a small audit application and I thought to use the dependency injection design pattern and unity container to inject the dependencies in Lazy binding manner. I just wanted to share my work with you guys so that you can also take the advantages of unity container. This post will give you the idea how to use the unity container in your future MVC project. Also, I would like to mention that I used the property injection in the example. Lets get started Step 1 – First thing first – prerequisite · VS 2015 · Unity.MVC (Get it from nuget. I used 5.0.3 version) Step 2 – Create a MVC application Step 3 – Install the Unity.MVC using nugget. After the installation you will see below files get added in project refere...