title: c# Understanding AsEnumerable in LINQ query
body: <p>Below code: </p>
  
  <pre><code>var mids = _db.Members
       .GroupBy(m =&gt; new { m.MemberID, m.CreatedDate })
       .Where(m =&gt; m.All(s =&gt; s.Status == 1) &amp;&amp; m.Key.CreatedDate.Date == DateTime.Today)
       .Select(m=&gt;m);
  </code></pre>
  
  <p>I get a run-time error: The specified type member 'Date' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported</p>
  
  <p>When I add <strong>_db.Members.AsEnumerable()</strong> to the first line it works.</p>
  
  <p>My understanding was that .AsEnumerable() forces the query to execute on the client side. So in the above code AsEnumerable operator break query into 2 parts select on server side and rest on the client side(group by,where).</p>
  
  <p>Can someone validate if my understanding is correct? and why the code failed without .AsEnumerable()?</p>