The Pehapkari.cz site has continued their series on domain-driven design with their latest tutorial covering the use of a repository for handling instances and collections of objects.
We will discuss how to store and read domain objects while pretending we have an in-memory system. Simply, we will show how to implement and test repository.
The article starts with a look at collections and the reality of using them outside of an in-memory environment. It then focuses in on the idea of a repository that live in the domain layer and some of the responsibilities they have as a part of the overall system. With the basics defined the tutorial then gets into the concrete implementation of the repository and how to write effective tests to ensure its correct functionality.