title: How to get datewise total in table using linq
body: <p>i want to get the data in my table date wise with total
  Here is my code what am trying to do </p>
  
  <pre><code>var result = from a in db.table
                        group a by a.date.Date into g
                        select new { date = g.Key, distance = g.Sum(a =&gt; a.distance) };
   return View(result.ToList());
  </code></pre>
  
  <p>If am using without Date part then am getting every data in a day.
  But by using this linq am getting error "The specified type member 'Date' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties".</p>