protected void Application_Start() { GlobalConfiguration.Configure(WebApiConfig.Register); RouteConfig.RegisterIgnoreRoutes(RouteTable.Routes); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); BundleConfig.RegisterBundles(BundleTable.Bundles); AreaConfig.RegisterAllAreas(); ModelBinders.Binders.Add(typeof(DateTime), new DateTimeModelBinder()); ModelBinders.Binders.Add(typeof(DateTime?), new DateTimeModelBinder()); ConfigureIoc(); }
#pragma warning disable S2325 // Methods and properties that don't access instance data should be static protected void Application_Start() #pragma warning restore S2325 // Methods and properties that don't access instance data should be static { GlobalConfiguration.Configure(WebApiConfig.Register); RouteConfig.RegisterIgnoreRoutes(RouteTable.Routes); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); BundleConfig.RegisterBundles(BundleTable.Bundles); AreaConfig.RegisterAllAreas(); ModelBinders.Binders.Add(typeof(DateTime), new DateTimeModelBinder()); ModelBinders.Binders.Add(typeof(DateTime?), new DateTimeModelBinder()); ConfigureIoc(); }