Julian Gonzalez

Generation

generate functionThu, 04 May 2023

example create middleware in web api .Net 6

public class MyMiddleware { private readonly RequestDelegate _next; public MyMiddleware(RequestDelegate next) { _next = next; } public async Task InvokeAsync(HttpContext context) { var a = 1; var b = 2; var c = a + b; // do something with c await _next(context); } }

Questions about programming?Chat with your personal AI assistant