Method BucketAuto
BucketAuto<TResult, TValue>(IAggregateFluent<TResult>, Expression<Func<TResult, TValue>>, int, AggregateBucketAutoOptions)
Appends a $bucketAuto stage to the pipeline.
public static IAggregateFluent<AggregateBucketAutoResult<TValue>> BucketAuto<TResult, TValue>(this IAggregateFluent<TResult> aggregate, Expression<Func<TResult, TValue>> groupBy, int buckets, AggregateBucketAutoOptions options = null)
Parameters
aggregateIAggregateFluent<TResult>The aggregate.
groupByExpression<Func<TResult, TValue>>The expression providing the value to group by.
bucketsintThe number of buckets.
optionsAggregateBucketAutoOptionsThe options (optional).
Returns
- IAggregateFluent<AggregateBucketAutoResult<TValue>>
The fluent aggregate interface.
Type Parameters
TResultThe type of the result.
TValueThe type of the value.
BucketAuto<TResult, TValue, TNewResult>(IAggregateFluent<TResult>, Expression<Func<TResult, TValue>>, int, Expression<Func<IGrouping<AggregateBucketAutoResultId<TValue>, TResult>, TNewResult>>, AggregateBucketAutoOptions)
Appends a $bucketAuto stage to the pipeline (this overload can only be used with LINQ3).
public static IAggregateFluent<TNewResult> BucketAuto<TResult, TValue, TNewResult>(this IAggregateFluent<TResult> aggregate, Expression<Func<TResult, TValue>> groupBy, int buckets, Expression<Func<IGrouping<AggregateBucketAutoResultId<TValue>, TResult>, TNewResult>> output, AggregateBucketAutoOptions options = null)
Parameters
aggregateIAggregateFluent<TResult>The aggregate.
groupByExpression<Func<TResult, TValue>>The expression providing the value to group by.
bucketsintThe number of buckets.
outputExpression<Func<IGrouping<AggregateBucketAutoResultId<TValue>, TResult>, TNewResult>>The output projection.
optionsAggregateBucketAutoOptionsThe options (optional).
Returns
- IAggregateFluent<TNewResult>
The fluent aggregate interface.
Type Parameters
TResultThe type of the result.
TValueThe type of the value.
TNewResultThe type of the new result.