Site icon Ryadel

Exploring ASP.NET Core 9 with Minimal APIs: A Full Demo Project

Rome .NET Conference 2025: Minimal API e ASP.NET Core 9

Minimal APIs are becoming a key architectural pattern in the .NET ecosystem—leaner, faster, and easier to write than traditional controller-based Web APIs. With the release of ASP.NET Core 9 (Preview), the Minimal API model receives a host of improvements in performance, routing, dependency injection, and OpenAPI support.

To showcase all of this in action, I’ve built a complete demo application that demonstrates how to build a real-world, production-grade API using the Minimal API pattern. This app was featured during my talk at the Rome .NET Conference 2025, organized and hosted by the DotNetCore community.

What This Project Covers

  • How to build a Minimal API using ASP.NET Core 9
  • Comparison with traditional Web APIs (controller-based)
  • Benefits, drawbacks, and ideal use cases
  • Deep dive into .NET 9’s new features
  • OpenAPI support with Swagger UI, ReDoc, and Scalar
  • Performance gains (up to 93% memory usage reduction)
  • Interactive benchmarking with Postman and nBomber

Application Features

This demo isn’t just a Hello World—it’s a complete, modular application that demonstrates:

  • Pure Minimal API architecture with no MVC Controllers
  • Entity Framework Core with a Code-First approach and a lightweight SQLite database
  • Repository Pattern with generic and specific interfaces
  • Database Seeding with Bogus (a .NET port of Faker.js)
  • Out-of-the-box OpenAPI integration:
    • Swagger UI
    • ReDoc
    • Scalar

At the end of the session, we'll also run real-time benchmarks and performance tests on the app using Postman and nBomber tools.

Project Structure

How to Run the App

  1. Install .NET 9 SDK (Preview)
  2. Clone the repo:
  3. Run the app:
  4. Browse to:
    or try /docs (ReDoc) or /scalar (Scalar).

Benchmarking and API Testing

Use Postman to test the API endpoints and structure. Then, simulate load tests and gather performance metrics with nBomber. The project is pre-configured to support realistic test scenarios and seeded data.

Topics from the NC2025 Conference Session

  • Minimal APIs: what they are and how they work
  • How they compare to controller-based Web APIs
  • Performance improvements in .NET 9
  • Native OpenAPI and Swagger integration
  • Parameter binding, validation, and request handling
  • Code-first database design with EF Core + SQLite
  • Repository pattern for clean separation of concerns
  • Real-world testing: Postman + nBomber

Final Thoughts

This project serves as both a learning resource and a template for building production-ready Minimal APIs using ASP.NET Core 9. Whether you're exploring the Minimal API paradigm for the first time or evaluating its place in your architecture, this app can help you take the next step.

Exit mobile version