title: NHibernate: Insert and update dates
body: <p>Using NHibernate, what is the best way to handle InsertDate (a.k.a CreateDate) and UpdateDate columns?</p>
  
  <p>For example:</p>
  
  <pre><code>public class Customer 
  {
       public virtual string Name { get; set; }
       public virtual DateTime InsertDate { get; set; }
       public virtual DateTime UpdateDate { get; set; }
  }
  </code></pre>
  
  <p>There are probably multiple ways that this could be handle, but could someone who has done this before provide me with some advice.</p>
  
  <p>If it's not obvious, I want InsertDate to be set to the date that a record was inserted and after that to be immutable. UpdateDate needs to be changed every time a record is updated.</p>
  
  <p>Bonus marks if you answer using Fluent Nhibernate.</p>