title: NHibernate: How to check if an entity is persistent
body: <p>I find myself writing code like the following quite a lot:</p>
  
  <pre><code>if (myEntity.Id == default(Guid))
     Session.Save(myEntity);
  </code></pre>
  
  <p>What is the best way to check if an entity is already persistent (and therefore doesnt need to be saved)?</p>
  
  <p>Am I doing something wrong writing code like this?</p>