With ASP.NET MVC3, what would be the best way to register ControllerContext requests in a lock windsor container? Ultimately, I would like to say
container.Resolve<ControllerContext>();
and returns a query from the query manager.
More details
The vast majority of my actions will simply perform verification, authentication, etc. before sending a message to nservicebus to actually do the job. To avoid having to copy / paste these 20/30 lines of code everywhere, I put them in a handler class in which my controllers depend on the constructor, the actions then call this class, which leaves my actions containing only one line of code.
One of the child classes that make up the handler needs to know about the route that was taken, I could just pass the controller to the handler and then to this class, but it seems a bit messy. It would be nice if there was a way to register Windsor to provide it to me.
source
share