title: Convert Expression<Func<T, object>> to Expression<Func<object>>
body: <p>How to convert :  <code>Expression&lt;Func&lt;T, object&gt;&gt;</code> to <code>Expression&lt;Func&lt;object&gt;&gt;</code>?</p>
  
  <p>For example: </p>
  
  <pre><code>public class Entity
  {        
      public virtual long Id { get; set; }
  }
  </code></pre>
  
  <p>Origin: </p>
  
  <pre><code>Expression&lt;Func&lt;Entity, object&gt;&gt; origin = x =&gt; x.Id;
  </code></pre>
  
  <p>Destination:</p>
  
  <pre><code>Entity alias = null;
  Expression&lt;Func&lt;object&gt;&gt; destination = () =&gt; alias.Id;
  </code></pre>
  
  <h2>Reason:</h2>
  
  <p>Actually I'm trying to create a custom cacheable ResultTransformer for Nhibernate. There is a method <code>public QueryOverProjectionBuilder&lt;T&gt; WithAlias(Expression&lt;Func&lt;object&gt;&gt; alias);</code> But in my classes for each particular entitites I would like to use more specific selector like <code>Expression&lt;Func&lt;T, object&gt;&gt;</code></p>