title: Does order of conditions under where clause in a LINQ query matter
body: <p>I am new to LINQ. Could anyone please clarify whether the order of conditions under where clause in a LINQ query matter.</p>
  
  <p>for eg: Is there any difference w.r.t performance between below two queries</p>
  
  <p>Query-1</p>
  
  <pre><code>from prod in Products 
  where prod.ExpiryDate == Products.Where(s =&gt; s.ID.Equals(CurrObj.Id) &amp;&amp; 
        s.Type.Equals(CurrObj.Type)).Max(s =&gt; s.ExpiryDate) &amp;&amp; 
        prod.ID.Equals(CurrObj.Id) &amp;&amp; prod.Type.Equals(CurrObj.Type) 
  select new
  {
     AmountFrom = prod.AmountFrom,
     AmountTo = prod.AmountTo
  }
  </code></pre>
  
  <p>Query-2</p>
  
  <pre><code>from prod in Products 
  where prod.ID.Equals(CurrObj.Id) &amp;&amp; 
        prod.Type.Equals(CurrObj.Type) &amp;&amp;
        prod.ExpiryDate == Products.Where(s =&gt; s.ID.Equals(CurrObj.Id) &amp;&amp; s.Type.Equals(CurrObj.Type)).Max(s =&gt; s.ExpiryDate)
  select new
  {
      AmountFrom = prod.AmountFrom,
      AmountTo = prod.AmountTo
  }
  </code></pre>
  
  <p><strong>Edit</strong>: I just measured the performance. Query-1 takes around 900ms whereas Query-2 takes 350ms.  </p>