title: Problems trying to use GroupBy with multiple properties using the LINQ Method Syntax
body: <p>I've got the following data:</p>
  
  <pre><code>Type (enum)   Date (DateTime)       Count (int)
  
  Red           2014-07-27 11:00:00   1
  Red           2014-07-27 10:00:00   1
  Red           2014-07-27 09:00:00   1
  Blue          2014-07-27 11:00:00   1
  Blue          2014-07-27 10:00:00   1
  Blue          2014-07-27 09:00:00   1
  </code></pre>
  
  <p>I would like to first group by the <code>Type</code> and then Sum the <code>Count</code> for every day. </p>
  
  <p>My desired output would be:</p>
  
  <pre><code>Type (enum)   Date (DateTime)       Count (int)
  
  Red           2014-07-27            3
  Blue          2014-07-27            3
  </code></pre>
  
  <p>The following code will group by day like I want it to but I have no idea how to combine both grouping by <code>Type</code> and by <code>Date</code>:</p>
  
  <pre><code>_entityContext.Statistics.
  .GroupBy(s =&gt; new { s.DateTime.Year, s.DateTime.Month, s.DateTime.Day})
  </code></pre>
  
  <p>I've been struggling this for a bit now and I end up with complex IGrouping structures and I'm kind of stuck now. Google steers me towards Query Syntax structures but I'm really wondering if this is possible using the Method Syntax. Last I knew Query Syntax gets translated to Method Syntax so it should be possible?</p>
  
  <p>Anyone can steer me in the right direction?</p>
  
  <p><strong>Note:</strong>
  LINQ TO Entities doesn't support accessing the 'Date' property on 'DateTime'. The exception you will get is: "The specified type member 'Date' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported"</p>