Abstract data access — generic repositories, Unit of Work, and when repositories help (or hurt).
Five passes over the same idea, each from a different angle. Do them in order, or jump to whichever you need.
The Repository pattern abstracts data access behind interfaces. Key concepts: generic repository (IRepository<T>), Unit of Work pattern, specification pattern, and the debate about repositories over EF Core. Benefits: testability and persistence ignorance. Drawbacks: leaky abstractions and unnecessary layers.