I have the following minimal API code:
routeBuilder.MapGet("/test", TestMethod);
routeBuilder.MapPost("/test2", TestMethod2);
...
public static async Task<IResult> TestMethod(HttpContext http)
{
...
}
public static async Task<IResult> TestMethod2(HttpContext http, DataContext context, [FromForm] string value)
{
...
}
When compiling I get the warning "ASP0016 Do not return a value from RequestDelegate" of the MapGet with TestMethod. TestMethod2 does not get this warning. Why is this happening? The documentation for that warning does not explain the issue in this case at all.