CS FundamentalsHardProduct-company placement

In a layered application, which pairing of the Repository and Unit of Work patterns is correct?

  1. A. Repository opens a transaction per method call; Unit of Work caches query results
  2. B. Repository is a collection-like API for aggregates; Unit of Work commits tracked changes atomically
  3. C. Repository maps HTTP routes onto services; Unit of Work schedules the background jobs
  4. D. Repository holds the business rules; Unit of Work holds the SQL text for each entity

Correct answer: B. Repository is a collection-like API for aggregates; Unit of Work commits tracked changes atomically

A repository hides persistence behind add/get/find methods on domain objects; a unit of work records new, changed and deleted objects during a business operation and writes them atomically at commit.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic