title: Is UnitOfWork equals Transaction? Or it is more than that?
body: <p>The internet is full of information about <code>UnitOfWork</code> pattern; even SO is not an exception.</p>
  <p>I still do not understand something about it. In my understanding <code>UnitOfWork = Transaction in DB</code>. Thats all; nothing more, nothing less.</p>
  <p>Is this correct?</p>
  <p>My confusion is due to how it is implemented in different <code>ORM</code>s. <code>NHibernate</code> uses <code>ISession</code> for more than just a <code>Transaction</code>. <code>Dapper</code> leaves everything to you.</p>
  <p>My question here is about design pattern only without considering any <code>ORM</code> or technology.</p>
  <p>If it is more than just <code>Transaction</code>, please explain how.</p>
  <p><strong>Edit 1</strong></p>
  <p>Reference to <a href="http://martinfowler.com/eaaCatalog/unitOfWork.html" rel="nofollow noreferrer">this</a> link as suggested in answer by @David Osborne.</p>
  <blockquote>
  <p>A Unit of Work keeps track of everything you do during a business
  transaction that can affect the database. When you're done, it figures
  out everything that needs to be done to alter the database as a result
  of your work.</p>
  </blockquote>
  <p>So this means <code>UnitOfWork</code> is <code>DBTransaction</code> <strong>and More</strong>.</p>
  <p>Following are its additional responsibilities: -</p>
  <ul>
  <li><p>Maintain state of what you have changed, inserted, deleted in this session of work.</p>
  </li>
  <li><p>Based on this state, modify the database when work is done.</p>
  </li>
  </ul>
  <p>Although not clearly mentioned in quote above, but it also may control batching of queries.</p>
  <p>Is my understanding correct now?</p>