Browse by Tags
All Tags »
IoC »
MVC Framework (
RSS)
Using the ControllerActivator in MVC 3 In the previous post I showed how to use the DependencyResolver in order to bring Dependency Injection behavior to a MVC 3 application. In this post I’ll show you how you can use the ControllerActivator in order to activate controllers using your own behavior. The IControllerActivator In MVC 3 beta a new interface was introduced – the IControllerActivator . This interface is an injection point in order to create our own behavior in order to activate controllers...
Dependency Injection in MVC 3 Was Made Easier In the past I wrote a post that showed how to implement Dependency Injection using Unity in ASP.NET MVC framework . This post revisits that post and shows how you can do the same thing easily in MVC 3 . Pay attention that the supplied code is based on MVC 3 beta and may change in the future. The IDependencyResolver and DependencyResolver MVC 3 introduces a new interface – the IDependencyResolver . This interface enables service location by providing two...
How To Use Unity Container In ASP.NET MVC Framework In the past I wrote the post How To Use Unity Container In ASP.NET . In this post I’m going to explain how we can use Unity IoC container in ASP.NET MVC Framework . Building The Container As in the previous post the first thing to do is to build the container itself. I’ll use the same method I used in the previous post in order to persist the Unity container ’s state during the application execution. The right place to put the Unity container is...