Exemple #1
0
        /// <summary>
        /// Application start.
        /// </summary>
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            ProCenterConfig.Bootstrap();

            ModelBinders.Binders.DefaultBinder = new ProCenterModelBinder();
            ModelBinders.Binders.Add(typeof(IEnumerable <LookupDto>), new EnumerableLookupDtoModelBinder());
            ModelMetadataProviders.Current = IoC.CurrentContainer.Resolve <ResourceModelMetadataProvider>();
            ModelValidatorProviders.Providers.Add(new CompletenessModelValidtorProvider());

            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            FilterConfig.RegisterWebApiGlobalFilters(GlobalConfiguration.Configuration);
            WebApiConfig.Register(GlobalConfiguration.Configuration);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
        }