Problem: I have a list with lots of data and I don’t know how to merge duplicate data into one unit + it should not affect others. If possible, would like everyting to be happened in the same list without creating more list to acheive the result Using LINQ
CaseID ApproverID
1 23
1 45
1 56
2 33
2 90
3 58
3 79
in broader sense i want something like caseID 1 with approverID AS 23 ,45,56
If you want to group the records, you can do this
The first lambda expression selects the group key. The second lambda expression selects the values. If you ommit the second expression, the source value will be returned. You can use the result like this:
The result will be
1 23 45 56 2 33 90 3 58 79