protected void Application_Start() { AreaRegistration.RegisterAllAreas(); //GlobalConfiguration.Configuration.EnableCors(new EnableCorsAttribute("*", "*", "*")); WebApiConfig.Register(GlobalConfiguration.Configuration); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); ModelBinders.Binders.Add(typeof(DateTime), new MyDateTimeBinder()); InitAutoMapper(); if (_miniProfilerEnabled) { MiniProfiler.Settings.PopupRenderPosition = RenderPosition.Right; MiniProfiler.Settings.SqlFormatter = new SqlServerFormatter(); MiniProfiler.Settings.ShowControls = false; MiniProfilerEF6.Initialize(); } UnityMVCBootstrapper.Initialise(UnityBootstrapper.Container); FluentValidationModelValidatorProvider.Configure(); }
protected void Application_Start() { System.Linq.Dynamic.Core.ExtensibilityPoint.QueryOptimizer = ExpressionOptimizer.visit; QueryInterceptor.Core.ExtensibilityPoint.QueryOptimizer = ExpressionOptimizer.visit; AreaRegistration.RegisterAllAreas(); //GlobalConfiguration.Configuration.EnableCors(new EnableCorsAttribute("*", "*", "*")); WebApiConfig.Register(GlobalConfiguration.Configuration); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); ModelBinders.Binders.Add(typeof(DateTime), new MyDateTimeBinder()); if (_miniProfilerEnabled) { MiniProfiler.Settings.PopupRenderPosition = RenderPosition.Right; MiniProfiler.Settings.SqlFormatter = new SqlServerFormatter(); MiniProfiler.Settings.ShowControls = false; MiniProfilerEF6.Initialize(); } UnityMVCBootstrapper.Initialise(UnityBootstrapper.Container); InitAutoMapper(type => UnityBootstrapper.Container.Resolve(type, null)); FluentValidationModelValidatorProvider.Configure(); }