ASP.NET Core MVC — What is IActionResult?

The IActionResult type is a based abstraction of an ActionResult.

💡 An ActionResult is a return type of a controller method, also called an action method, and serves as the base class for *Result classes. Action methods return models to views, file streams, redirect to other controllers, or whatever is necessary for the task at hand.

It specifies how a response is going to be given for a Specific Request.

The IActionResult return type is appropriate when multiple action result return types are possible in an action.

The IActionResult is an interface, while action results themselves are abstract classes.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Nawodya Ishan

Game Dev | Engineering Undergraduate Student at Sri Lanka Technological Campus.