score:2

Accepted answer

you can return distinct values of the platform collection by using enumerable.distinct().

the platforms value in the result selector in your .groupby() operation should be computed as follows:

platforms = g.select(p => p.platform).distinct().tolist()

score:0

maybe you could try something like this:

var group = recordlist.groupby(r => r.article)
                      .select(a =>
                        new
                        {
                            article = a.key,
                            platforms = a.groupby(g => g.platform)
                        });

Related Query

More Query from same tag