
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. ...