app.Use(async (context,next) => { await context.Response.WriteAsync("first middleware"); await next.Invoke(); });