Like every dusty collection of baseball cards, each needs a closet or under-bed area to be stored.
The repository class should be an abstract interface to data, allowing for Shoebox model & collections to be persisted across multiple repositories or repointed to new repositories at runtime
A repository should:
[ ] have only one instance (maybe a repo registry is needed? Maybe some DI support?)
[ ] have a method that makes it register itself as responsible for a model or collection, observing that collection for events that require updating the repository.
[ ] have knowledge of a factory by which a new model is created
[ ] have knowledge of the repository's data contract, and how that transforms to the model's contract
Like every dusty collection of baseball cards, each needs a closet or under-bed area to be stored.
The repository class should be an abstract interface to data, allowing for Shoebox model & collections to be persisted across multiple repositories or repointed to new repositories at runtime
A repository should: