title: How generate several Include() at runtime in a repository
body: <p>I have a <code>Customer</code> class the Customer can have several <code>Address</code></p>
  
  <p>In my repository I have this :</p>
  
  <pre><code>protected DbSet&lt;T&gt; Table;
  </code></pre>
  
  <p>and this method :</p>
  
  <pre><code>public T Find&lt;TIncludeField&gt;(Expression&lt;Func&lt;T, bool&gt;&gt; where,
      Expression&lt;Func&lt;T, TIncludeField&gt;&gt; include)
      =&gt; Table.Where(@where).Include(include).FirstOrDefault();
  </code></pre>
  
  <p>Then I can use it like this :</p>
  
  <pre><code>_customerRepo.Find(x =&gt; x.Reference.ToLower() == reference.ToLower(), x =&gt; x.Addresses);
  </code></pre>
  
  <p>I'd like to able to do this :</p>
  
  <pre><code>public T Find&lt;TIncludeField&gt;(Expression&lt;Func&lt;T, bool&gt;&gt; where,
      Expression&lt;Func&lt;T, ICollection&lt;TIncludeField&gt;&gt;&gt; includes)
      =&gt; Table.Where(@where).Include(includes).FirstOrDefault();
  </code></pre>
  
  <p>But I don't know how create at runtime a list of <code>.Include(includes)</code></p>
  
  <p>Any idea ?</p>
  
  <p>Based on :<a href="https://github.com/skimedic/dotnetcore_hol/blob/master/Code/Complete/SpyStore_HOL/SpyStore_HOL.DAL/Repos/Base/IRepo.cs" rel="nofollow noreferrer">Philip Japikse Code</a></p>
  
  <p>Thanks,</p>