var dealOtherDetail = items.GroupBy(x => new { x.DetailID }).Select(g => new { g.Key.DetailID, qty = g.Sum(a => a.AppointQty) }).ToList();
整理于网络。
var dealOtherDetail = items.GroupBy(x => new { x.DetailID }).Select(g => new { g.Key.DetailID, qty = g.Sum(a => a.AppointQty) }).ToList();
整理于网络。
转载于:https://www.cnblogs.com/iplay/p/7815969.html