Rule

  • Service — pure business logic, no side effects, unit-test friendly
  • Manager — orchestration: DB calls, external APIs, auth, context propagation

Flow

Manager
  ├── DB call → fetch data
  ├── Service.DoSomething(data) → pure logic
  └── DB call → save result

Testing

  • Unit tests → call Service directly, no mocking needed
  • Integration tests → test Manager with real DB and external services

See also