Method BucketAutoForLinq2
BucketAutoForLinq2<TInput, TValue, TOutput>(Expression<Func<TInput, TValue>>, int, Expression<Func<IGrouping<TValue, TInput>, TOutput>>, AggregateBucketAutoOptions, ExpressionTranslationOptions)
Creates a $bucketAuto stage (this method can only be used with LINQ2).
public static PipelineStageDefinition<TInput, TOutput> BucketAutoForLinq2<TInput, TValue, TOutput>(Expression<Func<TInput, TValue>> groupBy, int buckets, Expression<Func<IGrouping<TValue, TInput>, TOutput>> output, AggregateBucketAutoOptions options = null, ExpressionTranslationOptions translationOptions = null)
Parameters
groupBy
Expression<Func<TInput, TValue>>The group by expression.
buckets
intThe number of buckets.
output
Expression<Func<IGrouping<TValue, TInput>, TOutput>>The output projection.
options
AggregateBucketAutoOptionsThe options (optional).
translationOptions
ExpressionTranslationOptionsThe translation options.
Returns
- PipelineStageDefinition<TInput, TOutput>
The stage.
Type Parameters
TInput
The type of the input documents.
TValue
The type of the output documents.
TOutput
The type of the output documents.