79651701

Date: 2025-06-03 18:00:50
Score: 0.5
Natty:
Report link

For anyone reaching this thread, instead of doing Results.Ok or simply returning an object from the minimal API endpoint, use Results.Content

// before
return result;

// after
var json = Newtonsoft.Json.JsonConvert.SerializeObject(result);
return Results.Content(json, "application/json");
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: André Mantas