ASP.NET Minimal API Structure
Coding Tutorials Coding Tutorials
14.4K subscribers
3,033 views
107

 Published On Oct 13, 2023

Minimal APIs allow you to define your entire web service in Program.cs. But that's not ideal for maintainability. Here's how to structure your application.

Source code available at: https://github.com/JasperKent/Control...

Topics include:
- Creating a Minimal API application
- Adding GET, POST, PUT and DELETE endpoints
- Injecting services
- Using TypedResults
- Separating endpoint functions into a separate file
- Converting controller action methods to endpoints
- Naming routes
- Separating endpoint mapping code to a separate file
- Scaffolding endpoints

show more

Share/Embed