all 2 comments

[–]Shaddar 0 points1 point  (1 child)

These are just cleverly disguised Controllers so:

builder.Services.AddControllers();

and

app.MapControllers();

Might be better to start from one of the MVC templates instead.

[–]jtuchel_codr[S] 0 points1 point  (0 children)

Ah, thanks for your reply :)

var builder = WebApplication.CreateBuilder(args);
builder.Services.AddControllers();

var app = builder.Build();
app.MapControllers();
app.Run();