I would like to know how to group item and split every N record by using LINQ
# |ITEM |QUANTITY
==================
1 |ITEM01| 10
2 |ITEM01| 10
3 |ITEM01| 10
. . .
. . .
22|ITEM01| 10
23|ITEM02| 50
24|ITEM02| 50
Suppose there's a list with 23 ITEM001 and 2 ITEM002
How to get
ITEM |QUANTITY
=================
ITEM001 | 100
ITEM001 | 100
ITEM001 | 20
ITEM002 | 100
Group by ITEM, if grouped > 10, go to next
Is there any way to achieve it? Thanks for you help!
Thanks for those nice guys help! Further question, now i would like to group the list like (grouped every 10 records, after grouping, if count does not reach 10, do not group), Sorry for my poor English :(
ITEM |QUANTITY
=================
ITEM01 | 100
ITEM01 | 100
ITEM01 | 10
ITEM01 | 10
ITEM01 | 10
ITEM02 | 50
ITEM02 | 50
Thanks for your help again!