💡Repositories can be viewed as encapsulating either data models or aggregates and entities in a domain-driven design.
🔎Repositories used for fetching data may have different methods for returning different types of data.
🔄Repositories used for making state changes and exposing behaviors are simpler and often only require methods for getting and saving aggregates.
📉Overfetching data in repositories designed for querying can be avoided by separating the repository for reads and writes.
🌐Consider the underlying database implementation and the use case when designing and implementing repositories.