if i used below dose this considered a middlewear or a endpoint ,and dose middlewears only created using Use() and Run()
app.Map("/" ,async context => await context.Response.WriteAsync("Hello World") )
and alos i want to ask why dose the Use in this code invoked before the Map()
app.UseRouting();
app.Use(async (context, next) =>
{
await context.Response.WriteAsync(MyCustomKeyValue + '\n');
await next();
await context.Response.WriteAsync("The Value Appers there" + '\n');
});
app.Map("/", async (context) =>
{
await context.Response.WriteAsync("From Route /" + '\n');
});