A repository, for the purposes of this book, is a class that includes all or some of the CRUD operations (Create, Read, Update, and Delete). Repositories encapsulate persistence details in an application. A repository holds the means to the domain model (or entities).
More precisely, a domain model includes not only data, but also behavior. Another term used widely is data transfer object (DTO). Although the original definition of DTO was intended to describe a way to transport data between processes, many architectures (inaccurately) define DTO as an object that carries data between software components in the same process. To complicate things even more, there are value objects (objects that are equal if their properties are equal), and entities (objects that are equal based on their identity, which can be defined by a single property). When documenting...