Asp.net MVC RouteBase and IoC
问题 I am creating a custom route by subclassing RouteBase. I have a dependency in there that I'd like to wire up with IoC. The method GetRouteData just takes HttpContext, but I want to add in my unit of work as well....somehow. I am using StructureMap, but info on how you would do this with any IoC framework would be helpful. 回答1: Well, here is our solution. Many little details may be omitted but overall idea is here. This answer may be a kind of offtop to original question but it describes the