Mis-use of Repository pattern #36632
Labels
dotnet-architecture/svc
microservices/subsvc
Pri1
High priority, do before Pri2 and Pri3
⌚ Not Triaged
Not triaged
Hi.
Based on the most formal definition and description of the Repository pattern in Martin Fowler's "Patterns of Enterprise Application Architecture" (Addison Wesley, 2003), it would be better to use the term "Wrapper/Adapter" pattern instead of "Repository".
The true "Repository" is a mediator, and its duty is just fetching data, not persisting.
However, your version is merely a wrapper around a complex composite class (EF DbContext) that acts as a facade behind the scenes.
Many computer science students and software developers are misguided by this documentation because Microsoft is a giant tech company, and they believe every word of Microsoft documentation as if it were told by God.
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: