title: conditional include in linq to entities?
body: <p>I felt like the following should be possible I'm just not sure what approach to take.</p>
  
  <p>What I'd like to do is use the include method to shape my results, ie define how far along the object graph to traverse. but... I'd like that traversal to be conditional.</p>
  
  <pre><code>something like...
  
  dealerships
      .include( d =&gt; d.parts.where(p =&gt; p.price &lt; 100.00))
      .include( d =&gt; d.parts.suppliers.where(s =&gt; s.country == "brazil"));
  </code></pre>
  
  <p>I understand that this is not valid linq, in fact, that it is horribly wrong, but essentially I'm looking for some way to build an expression tree that will return shaped results, equivalent to...</p>
  
  <pre><code>select *
  from dealerships as d
  outer join parts as p on d.dealerid = p.dealerid
      and p.price &lt; 100.00
  outer join suppliers as s on p.partid = s.partid
      and s.country = 'brazil'
  </code></pre>
  
  <p>with an emphasis on the join conditions. </p>
  
  <p><strike>I feel like this would be fairly straight forward with esql but</strike> my preference would be to build expression trees on the fly.</p>
  
  <p>as always, grateful for any advice or guidance</p>