Ejemplo n.º 1
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            GlobalConfiguration.Configure(WebApiConfig.Register);



            log4net.Config.XmlConfigurator.Configure();
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
            Database.SetInitializer <SKContext>(new Initializer());
            DbInterception.Add(new EFIntercepterLogging());
            LayoutRandomSetLock.Get();
            UnityConfig.RegisterComponentsByWebApi();
            AutoMapperConfiguration.ConfigurationAutoMapper();   // 初始化AutoMapper对象投影
            JobScheduler.Start();
            //GlobalConfiguration.Configuration.Formatters.XmlFormatter.SupportedMediaTypes.Clear();
        }