The Generic Repository antipattern

Before we enter this topic, here is a quick reminder of the Repository pattern (the real, non-generic, one), as found in the book Patterns of Enterprise Application Architecture. A Repository mediates between the domain and data mapping layers using a collection-like interface for accessing domain objects. It’s a design pattern that abstracts the data access layer. It’s used to both persist and retrieve data (or entities in DDD) without exposing storage implementation details....

March 16, 2024 · 5 min