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 sit down to write an API, and before you know it, you’re knee-deep in controllers, attributes, and boilerplate. Sound familiar? What if you could skip all that and still build a fully functional API - fast? That’s where Minimal APIs in .NET come in. They’re clean and lightweight and make building APIs feel like a breeze. In my latest video, I show you how to set up endpoints step by step and structure everything neatly so your code stays easy to read and scale. No fluff - just...

video preview

Hey Reader, Ever sort through your books or video games to find the best one? 🎮 What if you could do that in your code - fast and easy? That’s what LINQ is all about! With LINQ, you can:✅ Find the stuff you want✅ Sort them by year, rating, or price✅ Filter to get only your favorites And the best part? No more long, boring loops! In my latest video, I show you:🔹 How to use LINQ step by step🔹 What Lambda Expressions are (and why they’re super simple)🔹 Real examples with a video game list you’ll...

video preview

Hey Reader, Ever tried to choose the perfect weapon for each creature in a dark, spooky forest? Silver bullets for werewolves, garlic for vampires, chainsaws for zombies... but what if you had to pick your weapon before entering the forest? Just like that forest adventure, dependency injection in C# can leave you stuck with the wrong tool when you need it most - unless you know about the Factory Pattern! Today, I’m breaking down how the Factory Pattern solves real-world dependency injection...