user@runtime:~/blog$ grep -l "dependency-injection" posts/*.md

dependency-injection

8 posts tagged with dependency-injection.

2026-04-11 8m

Keyed Services in .NET: The Built-In DI Feature You're Probably Not Using Yet

Keyed services bring named registrations to .NET's built-in dependency injection container, replacing custom factories and IEnumerable filtering with a clean, attribute-driven approach that works across the entire ASP.NET Core stack.

2026-04-02 9m

Microsoft.Extensions.AI: The Unified AI Abstraction Layer for .NET

Microsoft.Extensions.AI provides IChatClient, IEmbeddingGenerator, and VectorStoreCollection abstractions that decouple your .NET code from specific AI providers, with a middleware pipeline for caching, telemetry, and function calling.

2026-03-28 8m

TimeProvider: Finally, Testable Time in .NET

How System.TimeProvider in .NET 8 replaces years of IClock wrappers with a first-class abstraction for testable, deterministic time — and how FakeTimeProvider makes testing time-dependent code straightforward.

2026-03-13 4m

IOptions, IOptionsSnapshot, and IOptionsMonitor: Choosing the Right One

Understanding the three options interfaces in .NET's configuration system and when to use each one.

2026-02-21 3m

Scrutor: Assembly Scanning for .NET Dependency Injection

Use Scrutor to automatically register services by convention, eliminating repetitive DI registration code in .NET applications.

2026-02-14 4m

Dependency Injection in .NET MAUI: The Built-In Container

How to use the built-in Microsoft.Extensions.DependencyInjection container in .NET MAUI for pages, view models, and platform services.

2025-11-25 4m

The Decorator Pattern with Dependency Injection in .NET

How to use the decorator pattern with .NET's DI container to add cross-cutting concerns like caching, logging, and retry logic without modifying existing code.

2025-07-04 4m

Dependency Injection Lifetimes in ASP.NET Core

Learn the differences between transient, scoped, and singleton service lifetimes and when to use each one.