title: How do I reuse an Expression on a single object in another Expression
body: <p>I feel like I am missing something simple, but I have not found the documentation that answers my question. </p>
  
  <p>I have recently been decomposing some of the linq projections into reusable expressions. It works great when operating on a collection, but I can't seem to figure out how to apply an expression to a single object in another expression. Below is an example of what I am trying to accomplish:</p>
  
  <pre><code>public class Person
  {
      public string ID { get; set; }
      public string Name { get; set; }
  }
  
  public class PersonDto
  {
      public string ID { get; set; }
      public string Name { get; set; }
  }
  
  public class Department
  {
      Person Manager { get; set; }
      List&lt;Person&gt; Employees { get; set; }
  }
  
  public class DepartmentDto
  {
      PersonDto Manager { get; set; }
      List&lt;PersonDto&gt; Employees { get; set; }
  }
  
  public Expression&lt;Func&lt;Person, PersonDto&gt;&gt; CreatePersonDto = p =&gt; new PersonDto
  {
      ID = p.ID,
      Name = p.Name
  };
  
  public Expression&lt;Func&lt;Department, DepartmentDto&gt;&gt; CreateDepartmentDto = d =&gt; new DepartmentDto
  {
      Manager = d.Manager // How do I transform this `Person` using `CreatePersonDto`
      Employees = d.Employees.Select(CreatePersonDto) //Does not work either
  };
  </code></pre>
  
  <p>EDIT: To be clear, I am using Linq-to-Entities that needs to use this Expression to generate a SQL statement. As a result, I cannot <code>Compile</code> the expression to a <code>Func</code> as I might be able to using Linq-to-Objects.</p>