You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have some confusion regarding the repository pattern.my question is can I use more than one repository, for example, UserRepository, QuestionRepository, AnotherThingRepository.trying to follow the Single responsibility principle, and then create a Wrapper repository to hold all the repos.
The text was updated successfully, but these errors were encountered:
@BishoyAbd You can create as many repositories as needed for your project... with that said you should create repositories that are specific and not accessing data outside of their domain to stick to the SRP. Like the User repository should not return data that the QuestionRepository should be returning. If that makes sense.
@alexwhb obviously that makes no sense. First of all, the repository pattern used in this project is quite different than what the uncle bob introduced in his work. He used it as Domain model gateway. You are just confused with this project (apparently, old 3 tier architecture remix+) and the bob's clean architecture. For the original question, you may have one repo for one entity if you follow bob's clean Arch...
I have some confusion regarding the repository pattern.my question is can I use more than one repository, for example,
UserRepository
,QuestionRepository
,AnotherThingRepository
.trying to follow the Single responsibility principle, and then create a Wrapper repository to hold all the repos.The text was updated successfully, but these errors were encountered: