liveBook · Manning

IActionResult

IActionResult is an ASP.NET Core MVC interface representing the result of processing an HTTP request.

How 2 Manning books explain it

ASP.NET Core in Action, 3e

IActionResult is an ASP.NET Core interface representing instructions for producing an HTTP response from request-handling code.

How it is used
Uses response results in Razor Page handlers and controller actions to choose the kind of HTTP response.
How deep it goes
Explains result execution, testing separation, and common result types, with a worked web API action.
Examples
Uses a fruit API action that returns a value for a valid ID or NotFound() otherwise.
What you can do after
Apply it via ASP.NET Core to select HTML, redirect, file, content, or status responses.

Read how ASP.NET Core in Action, 3e explains IActionResult →

Pro ASP.NET Core 7, Tenth Edition

IActionResult is the ASP.NET Core MVC interface implemented by objects that represent the result of processing an HTTP request.

How it is used
Lets ASP.NET Core MVC controller actions select HTTP responses without writing directly to HttpResponse.
How deep it goes
Explains result-producing controller methods and demonstrates their request behavior; does not descend into IActionResult implementation internals.
Examples
Uses product GET and POST requests, PowerShell responses, redirects, and an HTML action returning a product view model.
What you can do after
Apply it via ASP.NET Core MVC to return status-code, redirect, or view results from controller actions.

Read how Pro ASP.NET Core 7, Tenth Edition explains IActionResult →

What to know first

Related concepts

Questions about IActionResult

What is IActionResult?

IActionResult is an ASP.NET Core MVC interface representing the result of processing an HTTP request.

Which Manning books explain IActionResult?

ASP.NET Core in Action, 3e and Pro ASP.NET Core 7, Tenth Edition.

What should I know before learning IActionResult?

Manning books that teach IActionResult usually introduce HTTP 404 error, routing and web API action method first.

What is the difference between IActionResult and IResult?

IActionResult is an ASP.NET Core MVC interface representing the result of processing an HTTP request. IResult is an ASP.NET Core interface representing the result of executing an HTTP endpoint.

What kinds of IActionResult are there?

Kinds of IActionResult include PageResult and ViewResult.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.