Exemplo n.º 1
0
        public override void RegisterArea(AreaRegistrationContext context)
        {
            var galleryDbConnectionFactory = DependencyResolver.Current.GetService <ISqlConnectionFactory>();

            context.Routes.Ignore("Admin/Errors.axd/{*pathInfo}"); // ELMAH owns this root
            DynamicDataManager.Register(context.Routes, "Admin/Database", galleryDbConnectionFactory);

            context.MapRoute(
                "Admin_default",
                "Admin/{controller}/{action}/{id}",
                new { controller = "Home", action = "Index", id = UrlParameter.Optional }
                );
        }
Exemplo n.º 2
0
        public override void RegisterArea(AreaRegistrationContext context)
        {
            var config = Container.Kernel.Get <IAppConfiguration>();

            context.Routes.Ignore("Admin/Errors.axd/{*pathInfo}"); // ELMAH owns this root
            context.Routes.Ignore("Admin/Glimpse/{*pathInfo}");    // Glimpse owns this root
            DynamicDataManager.Register(context.Routes, "Admin/Database", config);

            context.MapRoute(
                "Admin_default",
                "Admin/{controller}/{action}/{id}",
                new { controller = "Home", action = "Index", id = UrlParameter.Optional }
                );
        }