.MapGet("some/url/structure", (string foo, int bar) => HandleRequest(foo, bar));
barthere, can you just give it
MyRequestObjectthat has properties
Barand have it do model binding?
Result<T>type to let you signal error results without exceptions, for cases where errors are expected and not exceptional
return Results.NotFound<User>(query.UserId);rather than having to
throw new UserNotFoundException(query.UserId);
var result = await _mediator.Send(query); return MapToResponse(result);