A Cleaner Way to Build .NET Web APIs (No Controllers Needed!) 🤯


Hey Reader,

In my last video, I showed you how to build a CRUD app using Vertical Slice Architecture and controllers in .NET 9.

But… What if you could do the same thing - cleaner, simpler, and without all that controller clutter?

👉 That’s exactly what I show you in my brand-new video:

video preview

In this one, you’ll learn how to:

  • Use Minimal APIs instead of controllers
  • Keep your Program.cs neat and tidy
  • Stay fully organized with the Vertical Slice Architecture
  • Work with Carter, a super helpful library for modular endpoints
  • Still use CQRS + MediatR (but only if you want to)

It’s simple, modern, and super clean.

And yep, the complete source code is free to download (link’s in the video description).

If you're tired of bloated code or just want to try a different architecture style that actually scales, this is a must-watch.

And if you missed the first part (with the controller version), you can check that one out, too. 👇

video preview

Together, both give you a full picture.

Let me know what you think in the comments. I’d love to hear what you're building!

Take care & happy coding,

Patrick

P.S. Want to go further with real-world .NET & Blazor projects? Join me inside the .NET Web Academy and level up your dev skills with the community. Check it out here.


Patrick God

Become a .NET & Blazor expert with weekly tutorials featuring best practices and the latest improvements, right in your inbox.

Read more from Patrick God
video preview

Hey Reader, You may have seen the recent blog post from Jimmy Bogard (creator of MediatR and AutoMapper) announcing that these libraries are going commercial. And to be clear, I fully support that. Time is money, and supporting your family always comes first. BUT… In most of my projects, I don’t actually use everything MediatR offers. I usually just need a small part of it, the classic "send a request, get a response" pattern. So I thought: why not build a simple version myself? 👉 That’s...

video preview

Hey Reader, If you’ve ever built a simple CRUD app with a layered architecture… you might be making things harder than they need to be. In my newest YouTube tutorial, I show you how to build a scalable CRUD app using something super clean and refreshing: 👉 Vertical Slice Architecture in .NET 9 We’ll build a full Video Game API, step-by-step, with: .NET 9 Web API + Entity Framework Core Code-first migrations Controllers (yep, still using those!) The Mediator pattern for cleaner code And, of...

Hey Reader, Blazor and Tailwind CSS are my go-to combo for building modern web apps! But with Tailwind v4, some things have changed… and it’s actually easier now! 🎉 No more complex config files, no headaches. Just a simple step-by-step setup to get Tailwind running in your Blazor app the right way. 👉 Watch the tutorial here In this video, I walk you through: ✅ Installing Tailwind v4 with just a few commands ✅ Where to place your files (don’t mess this up!) ✅ How to auto-generate styles with...