API
Data service
Overview
Data Service — is a layer that has two functions: database updates and domain functions. Database updates encapsulate the logic of updating and reading data in a database (also known as Repository Pattern in DDD). Domain functions use database updates to perform domain changes (e.x. changeUserEmail
, updateCredentials
, etc). For simplicity, we break the single responsibility pattern here. Data Service is usually named as entity.service
(e.x. user.service
).