Category: .NET Development

Dependency Injection in Blazor: Inject All the Things

Dependency Injection in Blazor Components Explained

Still spinning up HttpClient manually in your Blazor components like it’s 2005? It’s time to modernize your approach with Dependency Injection (DI) — a core feature in Blazor that can streamline your code and supercharge testability. Blazor, both Server and WebAssembly, embraces DI out of the box. Services are registered in Program.cs using scoped, singleton, […]