title: Entity Framework Core Eager Loading Then Include on a collection
body: <p>I have three Models that I want to include when performing a query. </p>
  
  <p>Here is the scenario. </p>
  
  <pre class="lang-cs prettyprint-override"><code>public class Sale
  {
       public int Id { get; set; }
       public List&lt;SaleNote&gt; SaleNotes { get; set; }
  }
  
  public class SaleNote
  {
      public int Id { get; set; }
      public User User { get; set; }
  }
  
  public class User 
  {
      public int Id { get; set; }
  }
  </code></pre>
  
  <p>I can eager load the SaleNotes like this...
  </p>
  
  <pre><code>_dbContext.Sale.Include(s =&gt; s.SaleNotes);
  </code></pre>
  
  <p>However, trying to eager load the User model from the SaleNote using ThenInclude is challenging because it is a collection. I cannot find any examples on how to eager load this scenario. Can someone supply the code the goes in the following ThenInclude to load the User for each item in the collection.
  </p>
  
  <pre><code>_dbContext.Sale.Include(s =&gt; s.SaleNotes).ThenInclude(...);
  </code></pre>