NDR02 Repository postfix for classes that handle data access
Context
Business logic should not care where the data comes from. It needs a component that can retrieve or store information irrespective of type type of data store that is used. There are several options for naming a class that handles data access. We need to choose a naming convention for this.
Option
Repository
Reason
Decision
We will use Repository as postfix for classes that handle business logic
Consequences
- Our data access classes are postfixed with Repository.
- For example:
OrderRepository
- For example: