protected override void Establish_context() { base.Establish_context(); var config = new StructureMapConfiguration(); config.ScanAssembly(GetType().Assembly); config.Configure(); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); RegisterRoutes(RouteTable.Routes); StructureMapConfiguration.Configure(); var controllerFactory = new StructureMapControllerFactory(ObjectFactory.Container); ControllerBuilder.Current.SetControllerFactory(controllerFactory); }