title: Entity Framework - pessimistic locking
body: <p>What I am trying to do is basically <a href="http://knol.google.com/k/nhibernate-chapter-10-transactions-and-concurrency#10%282E%296%282E%29%28C2%29%28A0%29Pessimistic_Locking" rel="nofollow">what NHibernate does</a> when you do something like:</p>
  
  <pre><code>var instance = session.Get&lt;Customer&gt;(id, LockMode.Upgrade);
  </code></pre>
  
  <p>I need to lock the entity row in the database. Why I need that? 
  Imagine something like a workflow instance that can be updated by multiple actors(people or processes) at the same time. </p>
  
  <p>The constraints I have don't allow for optimistic locking solutions.</p>