Books in a library

In Defense of the Repository: Constrained, Specification-Driven, and Tunable

Many, dare I say most, .NET developers argue against the Repository Pattern when using Entity Framework Core (EF Core). A DbContext is already a unit of work. A DbSet<T> is already an IQueryable<T>, which is already a repository and a specification mechanism rolled into one, courtesy of LINQ. That’s the honest, strong version of the argument against adding a repository layer on top of EF Core, and the people making it aren’t wrong about the common failure mode: a repository with GetAll(), a dozen near-duplicate GetByXAsync() methods, or one that just hands back IQueryable<T> and calls it abstraction. That kind of repository adds a file; it doesn’t do anything a plain DbSet doesn’t already do. ...

November 17, 2026 · 29 min
A man wearing a black and teal tuxedo

When EF Core Isn't Enough: Adding Dapper Without Breaking Your Domain Model

I use EF Core almost exclusively for database access in my .NET projects. For the write side of almost any app, I want an aggregate that protects its own invariants, a repository that hides the database, and a unit of work that commits a transaction. EF Core gives me all of that without much ceremony. So when I say “here’s when I reached for Dapper,” I want to be clear up front: this isn’t a recommendation to replace EF Core, or even to use Dapper regularly. It’s a description of one place where EF Core’s own tools stopped being enough, and the rules I set for myself before I let a second data access library into the codebase. ...

November 3, 2026 · 20 min
A bonsai tree in a ceramic pot, its right side pruned into sharp, right-angled geometric branches

Upgrading to EF Core 11: Prettier SQL and a Few Ugly Changes

EF Core 11 is still in development as of this writing (based on the Microsoft Learn docs for EF Core 11, last updated August 2026). Some of what’s below could change before release. I tested against the mcr.microsoft.com/dotnet/nightly/sdk:11.0-preview image (resolving to SDK 11.0.100-rc.1.26411.119) and Microsoft.EntityFrameworkCore.SqlServer 11.0.0-preview.6.26359.118; see the companion code for the runnable version of every SQL example below. EF Core 11 ships alongside .NET 11, and it requires the .NET 11 SDK to build and the .NET 11 runtime to run; there’s no running it on .NET 10 or earlier, and definitely not on .NET Framework. ...

October 20, 2026 · 18 min