Dependency Injection in .NET: Service Lifetimes
Using the wrong DI lifetime is the #1 cause of concurrency bugs in ASP.NET Core. We revisit Singleton, Scoped, and Transient with a focus on thread safety. The Three Lifetimes Lifetime Created……
Using the wrong DI lifetime is the #1 cause of concurrency bugs in ASP.NET Core. We revisit Singleton, Scoped, and Transient with a focus on thread safety. The Three Lifetimes Lifetime Created……
Azure Static Web Apps (SWA) has hit GA. It’s the best way to host Blazor WASM, React, or Vue apps on Azure. Features Global Hosting: Content serves from edge locations. Integrated API:…
Traditional Azure SQL Database is limited by the disk size of the underlying VM (4TB max usually). **Hyperscale** decouples compute from storage, allowing databases to grow up to 100TB with rapid scaling.…
Mocking the database in tests is a lie. In-memory databases (like EF Core InMemory) behave differently than SQL Server. **Testcontainers** allows you to spin up real, throwaway Docker containers for your integration…
Redux is great for client state (is the modal open?), but terrible for server state (is this data fresh?). React Query (now TanStack Query) manages caching, background updates, and stale data automaticallly.…
Reflection is slow. It happens at runtime, bypasses type safety, and prevents trimming. Source Generators solve this by generating code at compile time. In this guide, we build a generator that automatically…
The latest update to VS 2019 is out. While we wait for VS 2022, 16.9 brings some solid stability fixes. Features Git Tooling: continued improvements to the new Git experience. C++: Address…