Method Unwind
Unwind<TResult>(IAggregateFluent<TResult>, FieldDefinition<TResult>)
Appends an unwind stage to the pipeline.
public static IAggregateFluent<BsonDocument> Unwind<TResult>(this IAggregateFluent<TResult> aggregate, FieldDefinition<TResult> field)
Parameters
aggregate
IAggregateFluent<TResult>The aggregate.
field
FieldDefinition<TResult>The field to unwind.
Returns
- IAggregateFluent<BsonDocument>
The fluent aggregate interface.
Type Parameters
TResult
The type of the result.
Unwind<TResult>(IAggregateFluent<TResult>, Expression<Func<TResult, object>>)
Appends an unwind stage to the pipeline.
public static IAggregateFluent<BsonDocument> Unwind<TResult>(this IAggregateFluent<TResult> aggregate, Expression<Func<TResult, object>> field)
Parameters
aggregate
IAggregateFluent<TResult>The aggregate.
field
Expression<Func<TResult, object>>The field to unwind.
Returns
- IAggregateFluent<BsonDocument>
The fluent aggregate interface.
Type Parameters
TResult
The type of the result.
Unwind<TResult, TNewResult>(IAggregateFluent<TResult>, Expression<Func<TResult, object>>, IBsonSerializer<TNewResult>)
Appends an unwind stage to the pipeline.
[Obsolete("Use the Unwind overload which takes an options parameter.")]
public static IAggregateFluent<TNewResult> Unwind<TResult, TNewResult>(this IAggregateFluent<TResult> aggregate, Expression<Func<TResult, object>> field, IBsonSerializer<TNewResult> newResultSerializer)
Parameters
aggregate
IAggregateFluent<TResult>The aggregate.
field
Expression<Func<TResult, object>>The field to unwind.
newResultSerializer
IBsonSerializer<TNewResult>The new result serializer.
Returns
- IAggregateFluent<TNewResult>
The fluent aggregate interface.
Type Parameters
TResult
The type of the result.
TNewResult
The type of the new result.
Unwind<TResult, TNewResult>(IAggregateFluent<TResult>, Expression<Func<TResult, object>>, AggregateUnwindOptions<TNewResult>)
Appends an unwind stage to the pipeline.
public static IAggregateFluent<TNewResult> Unwind<TResult, TNewResult>(this IAggregateFluent<TResult> aggregate, Expression<Func<TResult, object>> field, AggregateUnwindOptions<TNewResult> options = null)
Parameters
aggregate
IAggregateFluent<TResult>The aggregate.
field
Expression<Func<TResult, object>>The field to unwind.
options
AggregateUnwindOptions<TNewResult>The options.
Returns
- IAggregateFluent<TNewResult>
The fluent aggregate interface.
Type Parameters
TResult
The type of the result.
TNewResult
The type of the new result.