linq partion by 用法

var PartinoByList = list.OrderBy(x => x.DateType).GroupBy(x => new { x.ProductCatagoryId, x.SupplierName, x.ChannelName })
.Select(g => new { g, count = g.Count() })
.SelectMany(t => t.g.Select(b => b).Zip(Enumerable.Range(1, t.count),
(j, i) => new { j, rownumber = i }));

原文地址:https://www.cnblogs.com/zengpeng/p/9848449.html