From the course: Building Web APIs with ASP.NET Core 8

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Minimal APIs

Minimal APIs

- [Instructor] Maybe you remember this checkbox here, Use controllers. And it was disabled, and I enabled it. And when using the .Net CLI to create a web API, that feature was also disabled, and I had to enable it when setting up the project. Now, what happens if there is no checkbox, if I do not want to use controllers? Controllers are the web API development approach that has been in place since the very beginning. We will be using something called controllers, and in those controllers, we have the implementation of the API. So we kind of separate them out. And a new feature was added back in .Net 6, it was called minimal APIs. And the name minimal sounds like minimal feature set. But that's not true these days, instead, it's just minimal boilerplate code, I would say. So I remove that checkbox again, and we see what we are getting. I'm creating a new project using the same template, but with that option that I do not want to have controllers. And indeed, the project does not have a…

Contents