Refactoring an ASP NET Core WebAPI Controller based API to a minimal API - Johan Smarius

Refactoring an ASP NET Core WebAPI Controller based API to a minimal API - Johan Smarius

🎙 Johan Smarius 👥 231K 📅 November 24, 2026 ⏱ 57 min 👁 9 📄 tutorial 🧭 2026-11-24
Available in: English (current) Français

Keywords

ASP.NET CoreMinimal APIRefactoringC#Web API

Summary

In this talk recorded at NDC Oslo, Johan Smarius demonstrates how to migrate an existing ASP.NET Core WebAPI controller-based API to a minimal API approach. He begins with a brief history of Web API controllers and explains why one might consider moving to minimal APIs. Without using advanced architecture, he uses a simple author-book example to compare the two patterns. The talk is code-heavy: he first shows the original controller-based endpoints (GET, GET by id, POST) and then implements equivalent endpoints using minimal APIs. He covers key aspects such as producing response types, handling different return types (200/404), enabling validation, and using route groups to organize endpoints. He also introduces a service layer to avoid fat endpoints and to maintain separation of concerns, demonstrating how to use POCO services and extension methods for better structure. Throughout, he mentions benefits like less boilerplate code, better performance, AOT possibilities, and Microsoft’s focus on evolving minimal APIs. He concludes that minimal APIs offer comparable maintainability and testability while being more concise, and encourages developers to adopt them.

174 words

Critical Evaluation

Value of the Information & Strength of the Argument

The value lies in its practical, code-first approach, showing real migration steps without over-engineering. The argument for switching to minimal APIs is supported by concrete examples: simplified code, explicit return types, and the ability to structure endpoints via route groups and extension methods. The speaker also acknowledges the learning curve and the need to add validation manually, which adds credibility. However, the performance claims are not backed by benchmarks in this talk, and the discussion is primarily qualitative.

Scientific Rigor, Source Quality, Title Accuracy

The talk is technically sound, but no external sources or references are provided beyond the conference links in the description. The title is perfectly aligned with the content, which focuses on the migration process. The speaker demonstrates deep knowledge of the subject, and the code examples appear correct. The lack of a Q&A or discussion of alternatives reduces the completeness, but the practical demonstration is clear and replicable.

161 words

Title / Content Match

The title accurately describes the content: a step-by-step migration of a controller-based ASP.NET Core WebAPI to a minimal API.

Quality & Reliability

7/10

Talk from a known conference (NDC) by an experienced .NET developer (MVP). The demonstration is practical and reproducible, but no external sources are cited during the talk. The code examples are clear and the migration steps are well explained.

Key Moments

Cited Sources

Contribution & Novelties

The talk offers a practical, hands-on migration guide from controller-based APIs to minimal APIs, emphasizing maintainable code structure. It demonstrates how to use route groups, service classes, and extension methods to keep minimal APIs organized. The most valuable aspect is the realistic migration scenario and the cautionary reminders (e.g., enabling validation).

Pour aller plus loin :

100 words

Radar Profile

The radar profile shows balanced scores, with information quantity and fiabilité slightly higher than technical depth. The strong emphasis on practical demonstration and code structure is well reflected in the scores, while the lack of advanced performance metrics or external citations keeps the technical level moderate.

Reliability 7/10