title: EF does not include where clause
body: <p>I have a small issue with EF. I'm performing a query on a large table, and it takes very long. I think I found the cause, but cannot find a solution;</p>
  
  <p>My LINQ query looks like this:</p>
  
  <pre><code>IEnumerable&lt;string&gt; o = (from P in Table where P.ITEMID == itemid &amp;&amp; P.IMAGESIZE == size select P.PATH);
  return o.Any() ? o.FirstOrDefault() : null;
  </code></pre>
  
  <p>I expect this to produce a SQL query with a where clause, but what it actually produces is this:</p>
  
  <pre><code>SELECT 
  [Extent1].[ITEMID] AS [ITEMID], 
  [Extent1].........
  snap 10 columns
  FROM [dbo].[TABLE] AS [Extent1]
  </code></pre>
  
  <p>The where clause and select (I try to select only one column) are executed after enumeration. What I want it to do is to produce a SQL query with the where clause and select only one column.</p>
  
  <p>What am I doing wrong?</p>