title: pass IIncludableQueryable object to a DbSet in entity framework core
body: <p>How can I pass an objects of type <code>IIncludableQueryable</code> to a <code>DbSet&lt;&gt;</code> object?
  <code>IQueryable</code> type works but not <code>IIncludableQueryable</code>, when using <code>Include</code> and <code>ThenInclude</code>,</p>
  
  <p>Test method should accept a linked <code>IIncludableQueryable</code> element (<code>.Include().ThenInclude()</code>).</p>
  
  <p><strong>Test</strong>:</p>
  
  <pre><code>public IQueryable&lt;TEntity&gt; Test&lt;TEntity&gt;(DbSet&lt;TEntity&gt; dbSet, Expression&lt;Func&lt;IIncludableQueryable&lt;TEntity, object&gt;&gt;&gt; query) where TEntity : class =&gt; dbSet.Include(query);
  </code></pre>
  
  <p><strong>Caller example</strong>:</p>
  
  <pre><code>return Test&lt;Site&gt;(dbSet, .ThenInclude(app =&gt; app.Client)
              .ThenInclude(cl =&gt; cl.Country)
                  .ThenInclude(co =&gt; co.Culture)
      .Include(st =&gt; st.App)
          .ThenInclude(app =&gt; app.ServiceType)
      .Include(st =&gt; st.CORSEntries)
      .Include(st =&gt; st.DataConnection)
      .Include(st =&gt; st.Features)
          .ThenInclude(ft =&gt; ft.Cultures)
              .ThenInclude(clt =&gt; clt.Culture)
      .Include(st =&gt; st.MetaEntries)
          .ThenInclude(mt =&gt; mt.Culture)
      .Include(st =&gt; st.Views)
          .ThenInclude(vw =&gt; vw.MetaEntries)
              .ThenInclude(mt =&gt; mt.Culture));
  </code></pre>