title: What's the intent of the Rollback method in the Unit of Work pattern?
body: <p>As I understand it, a UnitOfWork class is meant to represent the concept of a business transaction in the domain. It's not directly supposed to represent a database transaction, which is a detail of only one possible implementation. </p>
  
  <p><strong>Q:</strong> So why does so much documentation about the Unit of Work pattern refer to "Commit" and "Rollback" methods?</p>
  
  <p>These concepts mean nothing to the domain, or to domain experts. A business transaction can be "completed", and therefore the UnitOfWork should provide a "Complete" method. Likewise, instead of a "Rollback" method, shouldn't it be modeled as "Clear"?</p>
  
  <p><strong>Update:</strong></p>
  
  <p><strong>Answer:</strong> Both answers below are correct. Their are two variants of UoW: object registration and caller registration. In object registration, Rollback serves to undo changes to all in-memory objects. In caller registration, Rollback serves to clear all recorded changes such that subsequent call to Commit will do nothing.</p>