title: Errors Working with Entity Framework Queries
body: <p>Can anyone tell me why the following code doesn't work?</p>
  
  <pre><code>IQueryable query = from pr in Repository.Query&lt;ProviderRanking&gt;()
                     orderby pr.ProviderRankingFlags.Any(), pr.TimestampUtc
                     select pr;
  
  int count = query.Count();
  IEnumerable&lt;ProviderRanking&gt; reviews = query.ToList();
  </code></pre>
  
  <p>The last two lines produce the errors:</p>
  
  <blockquote>
    <p>'System.Linq.IQueryable' does not contain a definition for 'Count' and no extension method 'Count' accepting a first argument of type 'System.Linq.IQueryable' could be found (are you missing a using directive or an assembly reference?)</p>
  </blockquote>
  
  <p>And:</p>
  
  <blockquote>
    <p>'System.Linq.IQueryable' does not contain a definition for 'ToList' and no extension method 'ToList' accepting a first argument of type 'System.Linq.IQueryable' could be found (are you missing a using directive or an assembly reference?)</p>
  </blockquote>
  
  <p>I was thinking that would work.</p>