Method SortByCount
SortByCount<TInput, TValue>(AggregateExpressionDefinition<TInput, TValue>)
Creates a $sortByCount stage.
public static PipelineStageDefinition<TInput, AggregateSortByCountResult<TValue>> SortByCount<TInput, TValue>(AggregateExpressionDefinition<TInput, TValue> value)
Parameters
valueAggregateExpressionDefinition<TInput, TValue>The value expression.
Returns
- PipelineStageDefinition<TInput, AggregateSortByCountResult<TValue>>
The stage.
Type Parameters
TInputThe type of the input documents.
TValueThe type of the values.
SortByCount<TInput, TValue>(Expression<Func<TInput, TValue>>)
Creates a $sortByCount stage.
public static PipelineStageDefinition<TInput, AggregateSortByCountResult<TValue>> SortByCount<TInput, TValue>(Expression<Func<TInput, TValue>> value)
Parameters
valueExpression<Func<TInput, TValue>>The value.
Returns
- PipelineStageDefinition<TInput, AggregateSortByCountResult<TValue>>
The stage.
Type Parameters
TInputThe type of the input documents.
TValueThe type of the values.