title: Entifyframework core 2.0 filter in ThenInclude
body: <p>I am using EF core 2.0 and would like to filter the child collection. Can anyone help me how to do this in EF core 2.0?</p>
  
  <pre><code>    var items = await _context.RiskType
                                .Include(r =&gt; r.Categories)
                                .ThenInclude(category =&gt; category.Alerts)
                                .ToListAsync();
  </code></pre>
  
  <p>In the above code i want to filter <code>category.Alerts.where(alert=&gt;alert.caseId==1)</code></p>
  
  <p>Thanks</p>