title: How to use System.Linq.Expressions.Expression to filter based on children?
body: <p>I have a filter that I use across many methods:</p>
  
  <pre><code>Expression&lt;Func&lt;Child, bool&gt;&gt; filter = child =&gt; child.Status == 1;
  </code></pre>
  
  <p>(actually is more complex than that)</p>
  
  <p>And I have to do the following</p>
  
  <pre><code>return db.Parents.Where(parent =&gt; parent.Status == 1 &amp;&amp;
                                    parent.Child.Status == 1);
  </code></pre>
  
  <p>where the condition is the same as in the filter above.</p>
  
  <p>I want to reuse the filter in this method. But I don't know how. I tried</p>
  
  <pre><code>return db.Parents.Where(parent =&gt; parent.Status == 1 &amp;&amp;
                                    filter(parent.Child));
  </code></pre>
  
  <p>but an Expression can't be used as a method</p>