Given:
var detailList = new List<DetailItem>();
Where:
class DetailItem
{
string A;
MyType B;
}
Can a LINQ query group on field A into the following data structure:
class GroupItem
{
string A;
List<MyType> AllBsWithinA;
}
IEnumerable<GroupItem> linqQuery = detailList.SomeLinqMagic(…);
The data in question is all memory based so this is a LINQ to Objects question.
This looks straightforward, unless I missed your meaning: