Table of Contents

Class GroupByBuilder

Namespace
MongoDB.Driver.Builders
Assembly
MongoDB.Driver.Legacy.dll

A builder for specifying what the GroupBy command should group by.

[Serializable]
[BsonSerializer(typeof(GroupByBuilder.Serializer))]
public class GroupByBuilder : BuilderBase, IConvertibleToBsonDocument, IMongoGroupBy
Inheritance
GroupByBuilder
Implements
Inherited Members
Extension Methods

Constructors

GroupByBuilder()

Initializes a new instance of the GroupByBuilder class.

public GroupByBuilder()

GroupByBuilder(string[])

Initializes a new instance of the GroupByBuilder class.

public GroupByBuilder(string[] names)

Parameters

names string[]

One or more key names.

Methods

Keys(params string[])

Sets one or more key names.

public GroupByBuilder Keys(params string[] names)

Parameters

names string[]

The names.

Returns

GroupByBuilder

The builder (so method calls can be chained).

ToBsonDocument()

Returns the result of the builder as a BsonDocument.

public override BsonDocument ToBsonDocument()

Returns

BsonDocument

A BsonDocument.