ControllerBase
ControllerBase is the ASP.NET Core MVC base class providing controller behavior and action-result helpers without view-specific functionality.
Pro ASP.NET Core 7, Tenth Edition
ControllerBase is the ASP.NET Core base class that provides controller behavior and helper methods for creating action results.
- How it is used
- Provides request features and action-result helpers for RESTful ASP.NET Core MVC controllers.
- How deep it goes
- Explains discovery, per-request properties, default return behavior, and explicit response helpers through controller actions; defers detailed validation treatment.
- Examples
- Uses product GET and POST actions, a missing-product request, and redirect actions tested with PowerShell commands.
- What you can do after
- Build it from scratch: create a ControllerBase-derived product controller and select explicit success, missing-resource, or redirect responses.
Read how Pro ASP.NET Core 7, Tenth Edition explains ControllerBase →
ASP.NET Core in Action, 3e
The Controller base class is the ASP.NET Core MVC base class that provides controller infrastructure, including access to an IUrlHelper.
- How it is used
- Supports ASP.NET Core web API controllers that expose HTTP actions without returning Razor views.
- How deep it goes
- Explains the base class, helper methods, inheritance choice, routing, serialization, and basic success and error responses.
- Examples
- Demonstrates FruitController, a fruit collection, GET routing, JSON serialization, and NotFound handling.
- What you can do after
- Build a small web API controller that returns serialized data and produces an appropriate error result.
Read how ASP.NET Core in Action, 3e explains ControllerBase →
Related concepts
- controllerincludes · A controller is a software component or architectural role that receives inputs or requests and coordinates their handling by other parts of an application.
- result resourceproduces · An action result is an abstraction representing the outcome or response produced by an API action, including a typed value or HTTP response.
- ViewBagused by · ViewBag is a dynamic ASP.NET Core MVC property bag for passing unstructured data from a controller or view component to a view.
- View methodhas part · A View method is an MVC controller method that creates a result for rendering a view, typically selecting the view from the action context.
- IUrlHelperproduces · IUrlHelper is an ASP.NET Core interface for generating URLs from routing information for application actions and endpoints.
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.

