DI(Dependency Injection) becomes the must-have patterns in any applications. MVC does work with any DI Containers such as Ninjet or Unity. MVC also provides the “Dependency Resolver” feature to make DI much easier.
When you resolve the registered type, the container return an object of that type. By default, the container does not hold the object reference. You can change the lifetime of the instance in different ways.
Registering type maps (from and to) is the first step in DI patterns. Unity provides a couple of ways to register types.
“Unity” is another framework for DI and some more. It is part of MS Enterprise Library but can be installed separately through NuGet. The main purposes of “Unity” are late binding and loose coupling.
Ninject is one of the most popular DI (Dependency Injection) frameworks. It is robust and easy to use; moreover it is free. You can always use DI pattern for your application but Ninject helps you integrate DI into your application.