人本善良

导航

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 }));

posted on 2018-10-25 10:56  简简单单2018  阅读(546)  评论(0)    收藏  举报