标签:ase sel linq var exp hive begin int pen
//var query = from d in expenseApplyModel.ApplyBillList.AsEnumerable()
// group d by d.ExpenseItemID into g
// select new
// {
// ExpenseItemID = g.Key,
// ExpenseAmount = g.Sum(t => t.ExpenseAmount)
// };//分组求和新添加的费用项目
var query = expenseApplyModel.ApplyBillList.GroupBy(x => new { x.ExpenseItem, x.ExpenseItemID }).
Select(group => new { peo = group.Key, ExpenseAmount = group.Sum(t => t.ExpenseAmount) });
http://www.cnblogs.com/beginor/archive/2009/04/24/1442939.html
http://www.cnblogs.com/bingguang/archive/2013/08/22/3275767.html
标签:ase sel linq var exp hive begin int pen
原文地址:http://www.cnblogs.com/jiangcm/p/7735663.html