Building APIs? Keyed Services Make It MAGIC 🧙‍♂️


Hey Reader,

Tired of factories and messy if-else logic in your projects?

Since .NET 8, Keyed Services make it easy to handle multiple implementations. No more clutter - just clean, scalable code.

In my new video, you’ll see how to dynamically pick services using a key and write code that’s easy to extend.

It’s a fresh, modern approach to dependency injection that’ll have you rethinking how you design your APIs.

👉 Watch the video here

video preview

Wishing you a fantastic start to the new year filled with exciting projects and clean code! 🎉

Take care,

Patrick

P.S. The Holiday Sale on the .NET Web Academy is ending tonight! 🎄 Get huge discounts on all courses and membership plans. 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, 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: 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...

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...