Ejemplo n.º 1
0
        protected void Application_Start()
        {
            RoleRepository repo = new RoleRepository();
            repo.InitRole();

            ControllerActionRepository actionAuthorizationRepo = new ControllerActionRepository();
            actionAuthorizationRepo.UpdateActionList();

            AreaRegistration.RegisterAllAreas();
            RegisterRoutes(RouteTable.Routes);
        }
        protected void Application_Start()
        {
            ControllerActionRepository actionAuthorizationRepo = new ControllerActionRepository();
            actionAuthorizationRepo.UpdateActionList();

            AppSettingRepository appSettingRepository = new AppSettingRepository();
            appSettingRepository.Reload();

            AreaRegistration.RegisterAllAreas();
            RegisterRoutes(RouteTable.Routes);

            var copy = ViewEngines.Engines.ToList();
            ViewEngines.Engines.Clear();
            foreach (var item in copy)
            {
                ViewEngines.Engines.Add(new ProfilingViewEngine(item));
            }

            GlobalFilters.Filters.Add(new ProfilingActionFilter());

            ModelBinders.Binders.Add(typeof(decimal?), new NullableDecimalModelBinder());
            ModelBinders.Binders.Add(typeof(decimal), new NullableDecimalModelBinder());
        }
Ejemplo n.º 3
0
        public ActionResult UpdateControllerAction()
        {
            RoleRepository repo = new RoleRepository();
            repo.InitRole();

            ControllerActionRepository actionAuthorizationRepo = new ControllerActionRepository();
            actionAuthorizationRepo.UpdateActionList();

            return RedirectToAction("Index", "Home");
        }