标签:
var groupList = (from a in list group a by a.OrderID into g select new C_Ordersbase() { OrderID = g.Key, DealDate = g.Where(x => x.OrderID == g.Key).First().DealDate, TotalPrice = g.Sum(x => x.TotalPrice), OrderState = g.Where(x => x.OrderID == g.Key).First().OrderState, });
标签:
原文地址:http://www.cnblogs.com/wangliuwei/p/4600333.html