Is there any IOC container that already implements a controller factory compatible with asp.net mvc 2.0 ....if so i'll move my projects to 2.0 to test... Anyone know a good reference about it?
A:
MVCContrib has four different flavors for you ( StructureMap, Windsor, Spring.Net, Unity ) http://github.com/mvccontrib/MvcContrib/tree/mvc2/src/
Here is a direct link to the Unity one: http://github.com/mvccontrib/MvcContrib/blob/mvc2/src/MvcContrib.Unity/UnityControllerFactory.cs
jfar
2009-12-18 05:26:12
A:
Good question. I migrated a project to ASP.NEt MVC 2 using Castle Windsor as IoC container. Been struggling to get areas to work to no avail. Keep getting System.ArgumentNullException exceptions. Other than this, everything works as expected...
Carles
2010-03-12 16:32:05
+2
A:
We're using NInject
and it works like a charm, too. I compiled it with MVC2 RTM and it works even with that.
mnemosyn
2010-03-12 16:36:39
+1 to `ninject`. handy tool.
zerkms
2010-06-13 05:35:54