When you start a new web API in .NET 10, the first fork in the road is also one of the most consequential: Minimal APIs or controllers? Both are first-class, both are fully supported, and both can build serious production services. The choice is not about which is "better" in the abstract it is about which fits the shape of your project, your team, and how you expect the codebase to grow. This guide is a decision framework, not a winner declaration: how each model works, where each excels, and how to choose without regret.
What this guide settles for you
- How Minimal APIs and controllers actually differ in practice
- Why Minimal APIs have closed much of the historic feature gap
- Where controllers still earn their place
- How to keep Minimal APIs organised so they scale
- A clear decision framework for your next project
Info
Both are fully supported, long-term
This is not a deprecation story. Microsoft invests in both models, and neither is going away. That means you can choose based purely on fit, not on fear of betting on the wrong horse.
The two models in brief
Controllers are the long-established MVC-style approach: endpoints are methods on classes that inherit from a base controller, grouped by convention, with attributes for routing and behaviour. Minimal APIs, introduced more recently and steadily matured, let you define endpoints directly as route handlers typically lambda or method references mapped to routes with far less ceremony and no required class hierarchy.
// Minimal API: the endpoint is the mapping.
app.MapGet("/products/{id:int}", async (int id, IProductService svc) =>
await svc.Find(id) is { } p ? Results.Ok(p) : Results.NotFound());
// Controller: the endpoint is a method on a class.
[ApiController]
[Route("products")]
public class ProductsController(IProductService svc) : ControllerBase
{
[HttpGet("{id:int}")]
public async Task<IActionResult> Get(int id) =>
await svc.Find(id) is { } p ? Ok(p) : NotFound();
}
Why the gap has narrowed
Early on, Minimal APIs were genuinely minimal fine for small services but missing pieces you needed at scale, which sent teams back to controllers. Release by release that gap has closed. Minimal APIs now handle the things that used to be controller-only: robust model binding, validation, grouping of related endpoints, filters for cross-cutting concerns, and clean OpenAPI generation. In .NET 10 they are a credible default for substantial APIs, not just toy ones.
Where Minimal APIs shine
✓ Pros
- Less boilerplate — the endpoint and its handler sit together
- Lower ceremony and an approachable on-ramp for new services
- Excellent fit for focused APIs and microservices
- Performance-friendly and explicit about dependencies per endpoint
- Route groups and endpoint filters keep cross-cutting concerns tidy
✕ Cons
- A flat pile of endpoint mappings gets messy without discipline
- Very large apps need deliberate file/grouping structure
- Teams steeped in MVC conventions face a small mental shift
- Some older tutorials and libraries still assume controllers
Where controllers still earn their place
✓ Pros
- Familiar, convention-driven structure large teams already know
- Natural grouping for big apps with many related endpoints
- Mature ecosystem, examples, and tooling built around MVC
- Attribute-based conventions can reduce repetition across endpoints
✕ Cons
- More boilerplate and indirection for simple endpoints
- The class/convention machinery is overkill for small services
- Slightly heavier mental model than a direct route mapping
- Convention "magic" can obscure what an endpoint actually does
Keeping Minimal APIs from becoming a mess
The most common objection to Minimal APIs — "they do not scale to big apps" — is really an objection to undisciplined Minimal APIs. The fix is structure: do not dump every endpoint into one file. Group related endpoints into route groups, extract handlers into named methods or small classes, and register them through extension methods so your app startup stays readable.
// Organise endpoints by feature, registered via extension methods.
public static class ProductEndpoints
{
public static IEndpointRouteBuilder MapProducts(this IEndpointRouteBuilder app)
{
var group = app.MapGroup("/products").WithTags("Products");
group.MapGet("/{id:int}", GetProduct);
group.MapPost("/", CreateProduct);
return group;
}
// handlers as named methods, not anonymous lambdas, for testability
}
// Program.cs stays clean:
app.MapProducts();
app.MapOrders();
Pro tip
Extract Minimal API handlers into named, injectable methods rather than inline lambdas. Named handlers are easier to unit test, easier to read in a stack trace, and keep your endpoint registration a clean table of contents instead of a wall of logic.
The decision framework
New, focused API or microservice?
Default to Minimal APIs. The lower ceremony pays off and the modern feature set has you covered.
Large app, big team already fluent in MVC?
Controllers are a reasonable, low-friction choice leaning on conventions your team already shares has real value.
Greenfield with no strong MVC habit?
Minimal APIs with disciplined grouping will likely age well and keep ceremony low.
Existing controller-based app?
Stay with controllers unless you have a concrete reason to migrate. Mixing both in one app is supported but adds cognitive overhead.
are first-class in .NET 10 — choose for fit, not fear
| Dimension | Minimal APIs | Controllers |
|---|---|---|
| Ceremony | Low endpoint and handler together | Higher classes and conventions |
| Best for | Focused services, microservices | Large, convention-heavy apps |
| Structure | Route groups + extension methods | Convention-based grouping |
| Team fit | Greenfield, low MVC habit | Teams already fluent in MVC |
| Feature parity (.NET 10) | Closed most of the historic gap | Mature and full-featured |
You can even mix them
ASP.NET Core lets controllers and Minimal APIs coexist in the same application, which is handy during a gradual migration or when one style fits part of your app better than another. Use this sparingly and deliberately, though a codebase split between two endpoint styles for no clear reason just makes onboarding harder. Pick a primary model and let the exceptions be genuine exceptions.
! Common mistakes to avoid
-
✕Dumping every Minimal API endpoint into one file.
✓Group by feature with route groups and register via extension methods so startup stays readable.
-
✕Writing handlers as inline lambdas everywhere.
✓Extract named, injectable handler methods easier to test and clearer in stack traces.
-
✕Mixing controllers and Minimal APIs with no clear rule.
✓Pick a primary model; let the other be a deliberate, documented exception.
-
✕Choosing based on hype rather than fit.
✓Decide on project shape and team familiarity both are first-class and fully supported.
? Frequently asked questions
Are Minimal APIs or controllers better in .NET 10? +
Neither universally. Minimal APIs suit focused, low-ceremony services; controllers suit large, convention-heavy apps and MVC-fluent teams. Both are first-class and build excellent APIs.
Do Minimal APIs scale to large applications? +
Yes, with discipline. The "they do not scale" objection is really about undisciplined Minimal APIs — group endpoints into route groups, extract named handlers, and register via extension methods.
Has the feature gap with controllers closed? +
Largely. Minimal APIs now handle robust binding, validation, grouping, filters, and clean OpenAPI generation — the things that used to be controller-only.
Can I use both in the same app? +
Yes, they coexist, which helps during a gradual migration. Use it sparingly and deliberately, though — two endpoint styles for no reason makes onboarding harder.
Which should a greenfield project use? +
If the team has no strong MVC habit, Minimal APIs with disciplined grouping tend to age well and keep ceremony low.
Success
There is no wrong answer, only a wrong fit
Minimal APIs for low-ceremony, focused services; controllers for large, convention-heavy apps and MVC-fluent teams. Both build excellent .NET 10 APIs. Decide by the shape of your project and your team, structure whichever you choose with discipline, and you will be happy with the result.
Comments
0No comments yet. Be the first to share your thoughts.