On a quest for the silver bullet..

Currently browsing posts found in June2009


ASP.NET MVC: Let StructureMap create your controllers

Number of Comments » 3

For those of you already familiar with StructureMap and want to use it to configure your objects in ASP.NET MVC, read on.
The ASP.NET MVC framework has a default controller factory (DefaultControllerFactory) that requires all controllers to have a parameterless constructor. So, if you want to inject your dependencies to the constructor, you can’t do it. [...]