void Main() { var mongo = new MongoDB.Driver.MongoClient("mongodb://test.test.local"); var db = mongo.GetDatabase("TEST"); var coll = db.GetCollection("TestColl"); //Try #1 Console.WriteLine(coll.Aggregate().Group(g => g.P1, p => new OutTestClass1() { P1 = p.Key, P2 = p.Max(pp => pp.P2), P3 = p.Select(i => i.P3).Distinct().ToArray() }).ToString()); //Try #2 Console.WriteLine(coll.Aggregate().Group(g => g.P1, p => new OutTestClass1() { P1 = p.Key, P2 = p.Max(pp => pp.P2), P3 = new HashSet(p.Select(i => i.P3)).ToArray() }).ToString()); //Try #3 Console.WriteLine(coll.Aggregate().Group(g => g.P1, p => new OutTestClass2() { P1 = p.Key, P2 = p.Max(pp => pp.P2), P3 = new HashSet(p.Select(i => i.P3)) }).ToString()); } public class TestClass { public string P1 { get; set; } public string P2 { get; set; } public string P3 { get; set; } } public class OutTestClass1 { public string P1 { get; set; } public string P2 { get; set; } public string[] P3 { get; set; } } public class OutTestClass2 { public string P1 { get; set; } public string P2 { get; set; } public HashSet P3 { get; set; } }