title: LinQ sum group by between using Lambda
body: <p>Help me convert it to lambda </p>
  
  <pre><code>select 
      Orders.Order_Date as date, sum(Amount) as amount
  from 
      Orders 
  inner join 
      OrderDetails on Orders.Order_ID = OrderDetails.Order_ID
  where 
      Order_Date&lt;= '2017-02-10' and Order_Date&lt;= '2017-02-11'
  group by 
      (Order_Date)
  order by 
      date asc
  </code></pre>
  
  <p><strong>My model:</strong></p>
  
  <pre><code>public class TotalIncome
  {
      [DataType(DataType.Date)]
      public DateTime fromDate { get; set; }
      [DataType(DataType.Date)]
      public DateTime toDate { get; set; }
      public List&lt;IncomeByDate&gt; ListIncome { get; set; }
  }
  </code></pre>
  
  <p><strong>my controller:</strong></p>
  
  <pre><code>var ba = db.Orders.Include(o =&gt; o.OrderDetails)
  .Where(o =&gt; o.Order_Date &gt;= startDate)
  .Where(o =&gt; o.Order_Date &lt;= endDate);
  </code></pre>
  
  <p>i can't sum amount and group by. Help me fix it </p>