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
value
AggregateExpression <TInput, TValue>Definition The value expression.
Returns
- Pipeline
Stage <TInput, AggregateDefinition Sort <TValue>>ByCount Result The stage.
Type Parameters
TInput
The type of the input documents.
TValue
The 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
value
Expression<Func<TInput, TValue>>The value.
Returns
- Pipeline
Stage <TInput, AggregateDefinition Sort <TValue>>ByCount Result The stage.
Type Parameters
TInput
The type of the input documents.
TValue
The type of the values.