Luis Soares
← Back to articles
.NET / C#May 30, 2026·8 min

Minimal APIs vs Controllers: when each one makes sense

Benchmarks, ergonomics and maintenance in real-world .NET projects.

LS
Luis Soares
Software architect — .NET · Azure · AI
[ .NET / C# ]

Minimal APIs in ASP.NET Core don’t replace controllers — they shrink the surface when the endpoint is small and stable.

When minimal makes sense

  • Simple read endpoints (health, config, webhooks).
  • Microservices with few routes and a small team.
  • Fast prototyping without a full MVC layer.
csharp
app.MapGet("/health", () => Results.Ok(new { status = "ok" }));

When to prefer controllers

Controllers still win when you need complex filters, explicit versioning, many DTOs, or integration tests that map to named actions. Minimal APIs push everything into one file — great at first, painful when they become a “god endpoint.”

Practical rule: start minimal if it fits on one screen; move to a controller when validation, auth policies, and tests start to hurt.

LS

Written by Luis Soares — software architect, on the road to Microsoft MVP.