Anthony Trad
Apr 30, 2022

Thank you for your comment.

Indeed, the conclusion clearly stated that you probably should not use the repository pattern. Please re-read my conclusion as I clearly reffered that you should not overuse this pattern (Last sentence in capital).

The repository should be used when needed and can be used a lot and not only for your infrastructure.

As you described yourself, one does not switch providers everyday. This pattern is getting so trendy that it became the default to use everywhere regardless of the case.

While i get your point about separation of concerns and testability, you can easily separate your concerns in the same db context as you know it will remain unchanged. DRY and SOLID remains respected...

The point of the article is that you should not use it to use it. I know there's benefits of using this pattern.

Anthony Trad
Anthony Trad

Written by Anthony Trad

Senior Software Engineer focused on .NET and the Cloud. Reconsidering major principles and patterns, ideas are my own.

No responses yet