title: Entity Framework Core : LINQ advise needed on better approach using include for relational tables
body: <p>I have a question about Entity Framework Core and using LINQ. I would like to get the other table details while accessing the <code>Clients</code> table. I can get them using below code. There are a total of around 10 tables I need to join, in this case is the below approach is good or any other, better approach? <code>ClientId</code> is the foreign key for all tables.</p>
  <p>Actually I am getting a warning as below</p>
  <blockquote>
  <p>[09:34:33 Warning] Microsoft.EntityFrameworkCore.Query
  Compiling a query which loads related collections for more than one collection navigation either via 'Include' or through projection but no 'QuerySplittingBehavior' has been configured. By default Entity Framework will use 'QuerySplittingBehavior.SingleQuery' which can potentially result in slow query performance. See <a href="https://go.microsoft.com/fwlink/?linkid=2134277" rel="noreferrer">https://go.microsoft.com/fwlink/?linkid=2134277</a> for more information. To identify the query that's triggering this warning call 'ConfigureWarnings(w =&gt; w.Throw(RelationalEventId.MultipleCollectionIncludeWarning))'</p>
  </blockquote>
  <p>Code:</p>
  <pre><code>var client = await _context.Clients
                  .Include(x =&gt; x.Address)
                  .Include(x =&gt; x.Properties)
                  .Include(x =&gt; x.ClientDetails)
                  -------------------
                  -------------------
                  -------------------
                  -------------------
                  .Where(x =&gt; x.Enabled == activeOnly &amp;&amp; x.Id == Id).FirstOrDefaultAsync();
  </code></pre>