Linq to SQL: how to aggregate without a group by?
This is what I found seems like you still have to do a group by…can just use constant: var orderTotals = from ord in dc.Orders group ord by 1 into og select new { prop1 = og.Sum(item=> item.Col1), prop2 = og.Sum(item => item.Col2), prop3 = og.Count(item => item.Col3) }; This produces the following SQL, which … Read more