protected override void Establish_context()
        {
            base.Establish_context();

            var config = new StructureMapConfiguration();

            config.ScanAssembly(GetType().Assembly);
            config.Configure();
        }
示例#2
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();

            RegisterRoutes(RouteTable.Routes);

            StructureMapConfiguration.Configure();

            var controllerFactory = new StructureMapControllerFactory(ObjectFactory.Container);

            ControllerBuilder.Current.SetControllerFactory(controllerFactory);
        }