public override void MapRoutes(EndpointRoutingBuilder builder) { builder.MapRoutes(StarterOrdering.AfterAuthenticationMiddleware, endpoints => { endpoints.MapMedia(); }); }
public override void MapRoutes(EndpointRoutingBuilder builder) { builder.MapRoutes(StarterOrdering.FirstRoute, endpoints => { endpoints.MapMedia(); }); }
public override void MapRoutes(EndpointRoutingBuilder builder) { builder.MapRoutes(StarterOrdering.EarlyRoute, endpoints => { endpoints.MapTaskScheduler(); }); }
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" }); }); }
public override void MapRoutes(EndpointRoutingBuilder builder) { if (!builder.ApplicationContext.IsInstalled) { return; } builder.MapRoutes(StarterOrdering.EarlyRoute, routes => { routes.MapDynamicControllerRoute <SlugRouteTransformer>("{**slug:minlength(2)}"); }); }
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" }); }); }
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?}"); }); }