Last active
April 19, 2022 12:24
-
-
Save rickbutterfield/429102ade0f5ab1bb758a1c2481d8e0f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void Configure(IApplicationBuilder app, IWebHostEnvironment env) | |
{ | |
app.UseUmbraco() | |
.WithMiddleware(u => | |
{ | |
u.UseBackOffice(); | |
u.UseWebsite(); | |
}) | |
.WithEndpoints(u => | |
{ | |
u.EndpointRouteBuilder.MapControllerRoute( | |
"BlogsByYear", | |
"/blog", | |
new { Controller = "Blog", Action = "Index" }); | |
u.EndpointRouteBuilder.MapControllerRoute( | |
"BlogsByYear", | |
"/blog/{year}", | |
new { Controller = "Blog", Action = "BlogsByYear" }); | |
u.EndpointRouteBuilder.MapControllerRoute( | |
"BlogsByYear", | |
"/blog/{year}/{month}", | |
new { Controller = "Blog", Action = "BlogsByYearAndMonth" }); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment