Example #1
0
        protected void Application_Start()
        {
            log4net.Config.XmlConfigurator.Configure();



            UnityServiceLocator serviceLocator  = new UnityServiceLocator(UnityConfig.GetConfiguredContainer());
            ICultureService     cultureService  = serviceLocator.GetInstance <ICultureService>();
            ISettingsService    settingsService = serviceLocator.GetInstance <ISettingsService>();

            AreaRegistration.RegisterAllAreas();
            GlobalConfiguration.Configure(WebApiConfig.Register);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);



            RouteConfig.RegisterRoutes(RouteTable.Routes, cultureService);
            BundleConfig.RegisterBundles(BundleTable.Bundles);



            IMigrationRunner migrationRunner = serviceLocator.GetInstance <IMigrationRunner>();

            migrationRunner.Update();
        }
Example #2
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);

            UnityServiceLocator serviceLocator  = new UnityServiceLocator(UnityConfig.Container);
            IMigrationRunner    migrationRunner = serviceLocator.GetInstance <IMigrationRunner>();

            migrationRunner.Update();
        }