Tag Archives: LifetimeManager

Enterprise Library 6, Unity 3 InterfaceInterceptor with MVC 4, Part 4

This post continues on from the previous post. Part 3 Enterprise Library 6, Unity 3 and MVC 4, Registration by Convention Part 3 Microsoft.Practices.Unity.Interception Unity provides both instance and type interception, and enables interception with either objects you resolve through the container, or by using the stand-alone API to explicitly invoke interception on a known […]

Enterprise Library 6, Unity 3 and MVC 4, Registration by Convention Part 3

This post continues on from the previous post. Part 2 Enterprise Library 6, Unity 3 and MVC 4, LifetimeManagers Part 2 The MVC application with unity is starting to take shape. It would be better if the registration by convention method could select which interfaces with which lifetime manager should be registered and only the […]

Enterprise Library 6, Unity 3 and MVC 4, LifetimeManagers Part 2

This is an example of an MVC Application using Register by Convention and Unity.MVC Use nuget to add Unity.MVC to the MVC4 application. (Unity bootstrapper for ASP.NET MVC 3.0.1304.0) Now edit the UnityMvcActivator in the App_Start folder. The following code must be included. Then change the UnityConfig class. Add a custom function and use this […]