Exemple #1
0
        /// <summary>
        /// The application start method.
        /// </summary>
        protected void Application_Start()
        {
            DisplayModeProvider.Instance.Modes.Insert(0, new MobileDisplayMode());

            AreaRegistration.RegisterAllAreas();

            var unityContainer = new UnityContainer();
            var resolver = new UnityDependencyResolver(unityContainer);
            DependencyResolver.SetResolver(resolver);

            ModelBinderConfig.RegisterModelBinders(unityContainer);
            FilterConfig.RegisterFilterProviders(unityContainer);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters, unityContainer);
            RouteConfig.RegisterRoutes(RouteTable.Routes);

            BundleConfig.RegisterStyles(BundleTable.Bundles);
            BundleConfig.RegisterScripts(BundleTable.Bundles);
        }
Exemple #2
0
        /// <summary>
        /// The application start method.
        /// </summary>
        protected void Application_Start()
        {
            DisplayModeProvider.Instance.Modes.Insert(0, new MobileDisplayMode());

            AreaRegistration.RegisterAllAreas();

            var unityContainer = new UnityContainer();
            var resolver       = new UnityDependencyResolver(unityContainer);

            DependencyResolver.SetResolver(resolver);

            ModelBinderConfig.RegisterModelBinders(unityContainer);
            FilterConfig.RegisterFilterProviders(unityContainer);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters, unityContainer);
            RouteConfig.RegisterRoutes(RouteTable.Routes);

            BundleConfig.RegisterStyles(BundleTable.Bundles);
            BundleConfig.RegisterScripts(BundleTable.Bundles);
        }