Practice question from Minimal APIs Introduction
What is the return type when using Results.Ok() in a Minimal API endpoint? A. ActionResult B. IActionResult C. IResult D. HttpResponse E. Task<IResult>
Answer
C
Explanation
Results.Ok() and other Results.* methods return IResult, which is the interface for Minimal API response types. This is different from controllers which use IActionResult.