Mediates between the domain and data mapping layers using a collection-like interface for accessing domain objects. by Edward Hieatt and Rob Mee

The Repository Pattern is a common construct to avoid duplication of data access logic throughout our application. The Repository pattern adds a separation layer between the data and domain layers of an application.

Why Use Repository Pattern : 

  • Increase test-ability and have a loose coupling to underlying persistence technology.
  • Improve the code’s maintainability and readability by separating business logic from data or service access logic.

1

1

References