title: Entity Framework: Querying Child Entities
body: <p>It seems that I can't get a parent and a subset of its children from the db.</p>
  <p>For example...</p>
  <pre><code>db.Parents
  .Include(p =&gt; p.Children)
  .Where(p =&gt; p.Children.Any(c =&gt; c.Age &gt;= 5))
  </code></pre>
  <p>This will return all Parents that have a child aged 5+, but if I iterate through the Parents.Children collection, all children will be present (not just those over 5 years old).</p>
  <p>Now the query does make sense to me (I've asked to include children and I've got them!), but can imagine that I would like to have the where clause applied to the child collection in some scenarios.</p>
  <p>How could I get an IEnumerable, in which each of the parents has a filtered collection of Children (Age&gt;=5)?</p>