title: How to only load certain fields of a child object in Entity Framework 6.1?
body: <p>I'm working on a model that has two classes, <code>Product</code> and <code>Transaction</code>.</p>
  
  <pre><code>public class Product
  {
      [DataMember]
      public Guid ProductId {get; set;}
  
      [DataMember]
      public virtual ICollection&lt;Transaction&gt; Transactions { get; set; }
  }
  
  public class Transaction
  {
      [DataMember]
      public Guid TransactionId {get; set;}
  
      [DataMember]
      public DateTimeOffset Date { get; set; }
  
      [DataMember]
      public String Customer { get; set; }
  }
  </code></pre>
  
  <p>How do I do a query that will retrieve a product and the Date of its transactions? I tried something like</p>
  
  <pre><code>var product = db.Products.Include(p =&gt; p.Transactions.Select(t =&gt; new { t.Date })).Where(p =&gt; p.ProductId = productId);
  </code></pre>
  
  <p>But it throws an exception:</p>
  
  <blockquote>
    <p>The Include path expression must refer to a navigation property
    defined on the type. Use dotted paths for reference navigation
    properties and the Select operator for collection navigation
    properties</p>
  </blockquote>
  
  <p>Edit for clarification:
  What I want to achieve is actually <em>not</em> loading  <code>TransactionId</code> and <code>Customer</code> when <code>Transaction</code> is loaded.</p>