Hammad Abbasi
1 min readDec 30, 2021

--

Hi Konrad,

First of all, thank you very much for taking your time and reading the article. You have raised really good points and I would love to share my two cents on them.

- I don’t see minimlal APIs as a replacement of ControllerBase APIs because, you can still develop Controller-base APIs in .NET 6.0) so to me they are more like enhancment. Also, No approach is better than something else, there are always some trade-offs that you need to balance. So IMO, Minimal APIs enables developers to build leightweight APIs. For example, If your are building a prototype or microservice (for a very specific need) then you don’t have to deal with naunces that comes with Controller Base APIs. And sure, there are cases where using Controller-base approach would make more sense instead of using an over-engineered solution with minimal API.

-Controller based APIs follows the convention whereas Minimal APIs give you the control to structure your APIs any way you want. And you don’t need to code everything in a single file (program.cs) as it allows you to simply register your API Classes in Program.cs and then Map the methods inside those classes (similar to controller-base APIs). However, there are no best practices yet on how to best structure the project. I am going to write a seperate post to discuss above points in detail.

Thanks.

--

--

Hammad Abbasi
Hammad Abbasi

Written by Hammad Abbasi

Innovating Enterprise Applications with AI & LLM | Solution Architect | Tech Writer & Innovator | Bringing Ideas to Life using Next-Gen Tech Innovations

Responses (1)