Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mis-use of Repository pattern #36632

Open
PerseusTheGreat opened this issue Aug 10, 2023 · 0 comments
Open

Mis-use of Repository pattern #36632

PerseusTheGreat opened this issue Aug 10, 2023 · 0 comments
Labels
dotnet-architecture/svc microservices/subsvc Pri1 High priority, do before Pri2 and Pri3 ⌚ Not Triaged Not triaged

Comments

@PerseusTheGreat
Copy link

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.

@dotnet-bot dotnet-bot added the ⌚ Not Triaged Not triaged label Aug 10, 2023
@issues-automation issues-automation bot added microservices/subsvc Pri1 High priority, do before Pri2 and Pri3 labels Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dotnet-architecture/svc microservices/subsvc Pri1 High priority, do before Pri2 and Pri3 ⌚ Not Triaged Not triaged
Projects
None yet
Development

No branches or pull requests

2 participants