#

dependency-injection

.NET dependency injection patterns

ProgrammingInject ICryptoService in Blazor WASM Non-Component Class

Learn to register Blazor.SubtleCrypto's ICryptoService in Program.cs and inject it via constructor into non-component classes in Blazor WebAssembly. Step-by-step guide for AES-GCM encryption/decryption with DI best practices.

1 answer 2 views
ProgrammingFastAPI WebSocket Cookie Dependency Injection: Why It Fails and How to Fix It

Learn why FastAPI's dependency injection can't access cookies in WebSocket endpoints and discover multiple solutions for proper cookie handling in FastAPI WebSockets.

1 answer 2 views
ProgrammingResolve JWT Signing Key with DI in ASP.NET Core JWT Bearer

Learn how to configure ASP.NET Core JWT Bearer authentication to resolve issuer signing keys dynamically from ISigningKeyRepository using dependency injection and IssuerSigningKeyResolver at runtime.

1 answer 2 views
WebAngular 19: inject(Location) Property vs Constructor DI

Why inject(Location) in property initializers fails in Angular 19 standalone components but constructor injection works. Fix timing issues with LOCATION_INITIALIZED and best practices for back buttons.

1 answer 1 view
ProgrammingComprehensive .NET Dependency Injection & Services Guide

Practical guide to .NET dependency injection and services: fundamentals, service lifetimes, keyed services, advanced patterns. Books, Microsoft docs, tutorials.

1 answer 1 view