Controllers and Actions

Learn about the role of controllers in ASP.NET Core MVC, introducing ControllerBase for web services and Controller for views.

In MVC, the C stands for the controller. From the route and an incoming URL, ASP.NET Core knows the name of the controller, so it will then look for a class that is decorated with the [Controller] attribute or derives from a class decorated with that attribute, for example, the Microsoft-provided class named ControllerBase, as shown in the following code:

Get hands-on with 1400+ tech skills courses.