IResult
The type minimal API handlers return to describe an HTTP response, created with helpers such as Results.Ok(product) or Results.NotFound().
In more detail
The framework calls the result's own code to write the status, headers and body. TypedResults does the same with concrete types that OpenAPI can read.
Related terms
- minimal API — An ASP.NET Core style that declares each route and its handler together, as in app.MapGet("/api/ping", () => Results.Ok("catalog")).
- ActionResult<T> — The return type of a controller action that can be either a typed success payload or another HTTP result, such as NotFound().
Taught in
- The Dependency Injection Container: Scopes and Lifetimes — Modern .NET Core, C# & Enterprise Microservices
- The ASP.NET Core Middleware Pipeline — Modern .NET Core, C# & Enterprise Microservices
- Building Routes with Minimal APIs — Modern .NET Core, C# & Enterprise Microservices
- Global Exception Handling and Problem Details — Modern .NET Core, C# & Enterprise Microservices