Module 03 of 12

Routing, Controllers & Minimal APIs

Lessons

About This Module

Routing is how ASP.NET Core decides which piece of your code handles a given URL and HTTP method. Once a request is matched, the framework binds values from the route, query string, and body into your handler's parameters — and your handler can be either a lightweight Minimal API endpoint or a method on a controller.

This module starts by building a Minimal API from scratch, then covers routing in depth: route templates, attribute-based versus convention-based routing, and HTTP methods. A lesson on model binding explains how data from the request reaches your code, and the module closes by comparing Minimal APIs and controllers so you can choose the right style for each project.

Watch the lessons in order, then continue on to Dependency Injection & Configuration.

Lessons

4 videos
01

Create a Minimal API with ASP.NET Core

A hands-on tutorial on the basics of building a minimal API, which is designed to create HTTP APIs with minimal dependencies.

02

Routing in ASP.NET Core Web API: A Complete Guide

How routing works in ASP.NET Core Web API, with examples of attribute-based and convention-based routing, route templates, and HTTP methods.

03

ASP.NET Core Model Binding Masterclass

A deep dive into model binding in Web APIs, breaking down the differences between [FromQuery], [FromBody], and [FromForm] and when to use each.

04

Minimal API vs Controller API: When to Use Each

A comparison of the two ways to build APIs in ASP.NET Core, and how to decide between them. Microsoft recommends Minimal APIs for new projects, but controllers are still widely used in existing code.