public override void MapRoutes(EndpointRoutingBuilder builder)
 {
     builder.MapRoutes(StarterOrdering.AfterAuthenticationMiddleware, endpoints =>
     {
         endpoints.MapMedia();
     });
 }
示例#2
0
 public override void MapRoutes(EndpointRoutingBuilder builder)
 {
     builder.MapRoutes(StarterOrdering.FirstRoute, endpoints =>
     {
         endpoints.MapMedia();
     });
 }
示例#3
0
 public override void MapRoutes(EndpointRoutingBuilder builder)
 {
     builder.MapRoutes(StarterOrdering.EarlyRoute, endpoints =>
     {
         endpoints.MapTaskScheduler();
     });
 }
示例#4
0
        public override void MapRoutes(EndpointRoutingBuilder builder)
        {
            builder.MapRoutes(StarterOrdering.LastRoute, routes =>
            {
                // Register routes from SlugRouteTransformer solely needed for URL creation, NOT for route matching.
                SlugRouteTransformer.Routers.Each(x => x.MapRoutes(routes));

                // TODO: (core) Very last route: PageNotFound?
                routes.MapControllerRoute("PageNotFound", "{*path}", new { controller = "Error", action = "NotFound" });
            });
        }
示例#5
0
        public override void MapRoutes(EndpointRoutingBuilder builder)
        {
            if (!builder.ApplicationContext.IsInstalled)
            {
                return;
            }

            builder.MapRoutes(StarterOrdering.EarlyRoute, routes =>
            {
                routes.MapDynamicControllerRoute <SlugRouteTransformer>("{**slug:minlength(2)}");
            });
        }
示例#6
0
        public override void MapRoutes(EndpointRoutingBuilder builder)
        {
            builder.MapRoutes(StarterOrdering.LastRoute, routes =>
            {
                // Register routes from SlugRouteTransformer solely needed for URL creation, NOT for route matching.
                SlugRouteTransformer.Routers.Each(x => x.MapRoutes(routes));

                // INFO: Test route
                // TODO: (mh) (core) Remove test route when not needed anymore.
                routes.MapLocalizedControllerRoute("RecentlyAddedProducts", "newproducts/", new { controller = "Catalog", action = "RecentlyAddedProducts" });

                // TODO: (core) Very last route: PageNotFound?
                routes.MapControllerRoute("PageNotFound", "{*path}", new { controller = "Error", action = "NotFound" });
            });
        }
示例#7
0
        public override void MapRoutes(EndpointRoutingBuilder builder)
        {
            builder.MapRoutes(StarterOrdering.EarlyRoute, routes =>
            {
                //routes.MapControllerRoute(
                //    name: "areas",
                //    pattern: "{area:exists}/{controller=Home}/{action=Index}/{id?}");

                routes.MapXmlSitemap();

                routes.MapControllers();

                routes.MapControllerRoute(
                    name: "default",
                    pattern: "{controller=Home}/{action=Index}/{id?}");
            });
        }