sajad torkamani

Services

  • Part of the business logic layer.
  • Concerned with implementing business rules. For example:
    • Determine initial status of a credit card application
    • Determine what client details to expose when a client is referred from one firm to another.
  • A service can interact with multiple repositories to perform its operations.

Repositories

  • Part of the data access layer.
  • Concerned with data retrieval and persistence. For example:
    • How to find all the different types of reports for a client using a clientId.
    • How to find all the notes between two firms regardless of which firm users added those notes.
  • A repository isn’t usually aware of higher-level business logic.

Leave a comment

Your email address will not be published. Required fields are marked *