liveBook · Manning

ControllerBase

ControllerBase is the ASP.NET Core MVC base class providing controller behavior and action-result helpers without view-specific functionality.

How 2 Manning books explain it

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

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.