Skip to content
ballmüllersolutions logo Send an email Call us
November 27, 2026

Model-View-Controller (MVC)

Model-View-Controller (MVC) is a design pattern that separates an application into model, view, and controller: data and business logic, presentation, and input handling. ASP.NET Core MVC implements it for web applications.

Model-View-Controller (MVC) is an architectural pattern that separates an application into three groups of components: the model (state and business logic), the view (presentation), and the controller (accepts input and chooses what comes back as the answer). The goal is the separation of concerns.

The three roles in ASP.NET Core

Microsoft's documentation describes the flow like this: a request is routed to a controller. It works with the model to carry out the user's action or fetch the result of a query, chooses the view, and hands it the model data it needs.

The direction of the dependency matters: view and controller depend on the model, but the model depends on neither view nor controller. That way, the business logic can be built and tested without a user interface.

public sealed class ContactsController(IContactService contacts) : Controller
{
    public async Task<IActionResult> Details(int id)
    {
        Contact? contact = await contacts.FindAsync(id);
        if (contact is null)
        {
            return NotFound();
        }

        return View(contact);
    }
}

MVC and the other ways in ASP.NET Core

MVC is only one of several ways to build web user interfaces and interfaces in ASP.NET Core. Razor Pages put the page and its handler side by side in one folder. Minimal APIs describe endpoints directly. Blazor builds the user interface from components written in C# and HTML. The web API template uses the same controllers as MVC, just without views. You can mix the approaches in one project.

For a new application, MVC is not a must. The pattern, the separation of presentation, input, and business logic, stays useful without controllers too.

An example from the Kladde

In the course, the Kladde, the sample application of a small IT office, uses no MVC controllers: its API consists of minimal API endpoints, and its pages are Blazor components. You still find the idea of the pattern, because the rules live in a core that the API and the user interface share, and the pages only present.

Common misconceptions

In the course

The academy does not teach MVC as a topic of its own but relies on minimal APIs and Blazor. You learn the web API in K2, module 2.3, in The first web API, and the user interface in module 2.5 in The Blazor Web App. Why rules live in the model and not at the edge is shown in Validation at the edge, rules in the model.

Further reading on the blog

Sources