Add razor service
Add razor service
let us modify the program code as shown:
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddRazorPages();
var app = builder.Build();
//app.MapGet("/", () => "Hello ASP World!");
app.MapRazorPages();
app.Run();
Restart
Hot reload may not always work especially when we have non visual changes like the one we did above, so let us restart the app and then we should see the following output on the browser

Routing
Currently the application is using convention based routing over any configuration. We will later see how we can further configure the route as and when required.
Last updated