title: How to store pieces of Linq expression in variables and use those variables in a query?
body: <p>I have an expression like this:</p>
  
  <pre><code>List&lt;BAL.Receipt&gt; ac = BAL.ApplicationInfo.db.Receipts.Where
                  (x =&gt; x.InvoiceNo.StartsWith(txtSearch.Text)
                   | x.Alias.StartsWith(txtSearch.Text)
  </code></pre>
  
  <p>What I want to do is split this expression into parts and store them in variables </p>
  
  <p>Like </p>
  
  <pre><code>var a = x =&gt; x.InvoiceNo.StartsWith(txtSearch.Text);
  var b = x =&gt; x.Alias.StartsWIth (txtSearch.Text) ; 
  </code></pre>
  
  <p>When query </p>
  
  <pre><code>List&lt;BAL.Receipt&gt; ac = BAL.ApplicationInfo.db.Receipts.Where( a &amp; b) ; 
  </code></pre>
  
  <p>Is it possible to achieve this?</p>
  
  <p>If possible, please show me an example.</p>