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
groupByExpression<Func<TInput, TValue>>The group by expression.
bucketsintThe number of buckets.
outputExpression<Func<IGrouping<TValue, TInput>, TOutput>>The output projection.
optionsAggregateBucketAutoOptionsThe options (optional).
translationOptionsExpressionTranslationOptionsThe translation options.
Returns
- PipelineStageDefinition<TInput, TOutput>
The stage.
Type Parameters
TInputThe type of the input documents.
TValueThe type of the output documents.
TOutputThe type of the output documents.