Method Group
Group<TInput, TOutput>(ProjectionDefinition<TInput, TOutput>)
Creates a $group stage.
public static PipelineStageDefinition<TInput, TOutput> Group<TInput, TOutput>(ProjectionDefinition<TInput, TOutput> group)Parameters
- groupProjectionDefinition<TInput, TOutput>
- The group projection. 
Returns
- PipelineStageDefinition<TInput, TOutput>
- The stage. 
Type Parameters
- TInput
- The type of the input documents. 
- TOutput
- The type of the output documents. 
Group<TInput>(ProjectionDefinition<TInput, BsonDocument>)
Creates a $group stage.
public static PipelineStageDefinition<TInput, BsonDocument> Group<TInput>(ProjectionDefinition<TInput, BsonDocument> group)Parameters
- groupProjectionDefinition<TInput, BsonDocument>
- The group projection. 
Returns
- PipelineStageDefinition<TInput, BsonDocument>
- The stage. 
Type Parameters
- TInput
- The type of the input documents. 
Group<TInput, TValue, TOutput>(Expression<Func<TInput, TValue>>, Expression<Func<IGrouping<TValue, TInput>, TOutput>>)
Creates a $group stage.
public static PipelineStageDefinition<TInput, TOutput> Group<TInput, TValue, TOutput>(Expression<Func<TInput, TValue>> value, Expression<Func<IGrouping<TValue, TInput>, TOutput>> group)Parameters
- valueExpression<Func<TInput, TValue>>
- The value field. 
- groupExpression<Func<IGrouping<TValue, TInput>, TOutput>>
- The group projection. 
Returns
- PipelineStageDefinition<TInput, TOutput>
- The stage. 
Type Parameters
- TInput
- The type of the input documents. 
- TValue
- The type of the values. 
- TOutput
- The type of the output documents. 
Remarks
This method can only be used with LINQ2 but that can't be verified until Render is called.