Minimal APIs in ASP NET 6 0
summary
Starts from a .NET 5 project and upgrades to .NET 7 while applying C# 10 features like file-scoped namespaces and implicit global usings, then folds Startup into top-level program.cs and adds minimal map get/post endpoints that return IResult. Builds a 46-line microservice with Swagger and health checks, demonstrates validation and custom IResult responses, and shows unit tests (xUnit, FluentAssertions, Moq, AutoMocker) plus in-memory integration tests that exercise the full request pipeline; the examples compile and the tests pass.
AI-written summary · about
chapters (12)
- 0:00Introduction and setup
- 4:57Building a minimal API
- 11:40Upgrading to ASP.NET 7
- 13:28File scope namespaces
- 15:58Global using statements
- 21:36Implicit using statements
- 24:29New startup experience
- 30:39Adding minimal APIs
- 37:48Testing strategies
- 47:16Organizing minimal APIs
- 52:56When to use minimal APIs
- 57:51Conclusion and resources
related talks
54mMinimal APIs in ASP.NET 6.0
46mLet’s Get Minimal: .NET 6 New APIs in ASP.NET Core
01h 11mASP.NET Basics for Experts
47mASP. NET Basics For Experts
01h 18mProfessional Web APIs using ASP.NET Core 2.1
51mBuilding Web APIs with ASP.NET Core
59mASP .NET Basics for Experts
54mGoodbye controllers, hello Minimal APIs
