The convention in our microservices is to return the result as follows:
return result.StatusCode == (int) HttpStatusCode.Created
? StatusCode(result.StatusCode, result.MessageCode)
: Problem(result.MessageCode, statusCode:result.StatusCode);
So making use of the StatusCode and Problem in Microsoft.AspNetCore.Mvc class ControllerBase.
We're adding a new microservice and figured we'd try to implement it as a Minimal API. Is there an equivalent for the Minimal API that follows the same structure?