Category Unity
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 […]
Enterprise Library 6, Unity 3 with ASP.NET MVC 4 Part 1
This example shows you how to setup a simple ASP.NET MVC 4 application using Enterprise Library Unity 3 for its dependency injection. Firstly use nuget to add the Unity 3 package: Create a new static class which will be used to get the root UnityContainer. Create a new class which inherits from the DefaultControllerFactory, otherwise […]
