title: How to map Id to private backing field in NHibernate's mapping by code?
body: <p>When using NHibernate's mapping by code functionality, how can I map the Id of an entity to a private backing field?</p>
  
  <pre><code>public abstract class Entity : IEntity
  {
      private Guid? _id;
  
      protected Entity() { }
  
      protected Entity(Guid? id)
      {
          _id = id;
      }
  
      #region IEntity Members
  
      /// &lt;summary&gt;
      /// Gets the unique id for this entity.
      /// &lt;/summary&gt;
      /// &lt;value&gt;The id.&lt;/value&gt;
      public Guid? Id
      {
          get { return _id;
      }
  }
  </code></pre>
  
  <p>Mapping:</p>
  
  <pre><code>public abstract class GuidKeyedClassMapping&lt;T&gt; : ClassMapping&lt;T&gt; where T : class, IEntity
  {
      protected GuidKeyedClassMapping()
      {
          // What to write here???
          Id(x=&gt; x.Id);
      }
  }
  </code></pre>
  
  <p>Have tried with pointing out the property or field with string but to no avail.</p>
  
  <pre><code>Id(x =&gt; "_id", m =&gt; m.Access(Accessor.Field));
  </code></pre>
  
  <p>...gives me:</p>
  
  <blockquote>
    <p>An exception of type 'System.Exception' occurred in NHibernate.dll but
    was not handled in user code Additional information: Invalid
    expression type: Expected ExpressionType.MemberAccess, Found Constant</p>
  </blockquote>