Problem Statement
What is the goal of the Repository pattern in LLD?
Explanation
A repository abstracts how aggregates are loaded and saved, so domain code stays persistence-agnostic. It also centralizes queries and caching policy.
Keep its interface narrow and aligned with aggregate boundaries to avoid an anemic domain.
Code Solution
SolutionRead Only
interface OrderRepo{ byId(id:Id): Order; save(o:Order): void }Practice Sets
This question appears in the following practice sets:
