Method Unwind

| MongoDB CSharp Driver API Reference (original) (raw)

Namespace

MongoDB.Driver

Assembly

MongoDB.Driver.dll

Unwind<TInput, TOutput>(FieldDefinition, AggregateUnwindOptions)

Creates an $unwind stage.

public static PipelineStageDefinition<TInput, TOutput> Unwind<TInput, TOutput>(FieldDefinition<TInput> field, AggregateUnwindOptions<TOutput> options = null)

Parameters

field FieldDefinition

The field.

options AggregateUnwindOptions

The options.

Returns

PipelineStageDefinition<TInput, TOutput>

The stage.

Type Parameters

TInput

The type of the input documents.

TOutput

The type of the output documents.

Unwind(FieldDefinition, AggregateUnwindOptions)

Creates an $unwind stage.

public static PipelineStageDefinition<TInput, BsonDocument> Unwind<TInput>(FieldDefinition<TInput> field, AggregateUnwindOptions<BsonDocument> options = null)

Parameters

field FieldDefinition

The field to unwind.

options AggregateUnwindOptions<BsonDocument>

The options.

Returns

PipelineStageDefinition<TInput, BsonDocument>

The stage.

Type Parameters

TInput

The type of the input documents.

Unwind(Expression<Func<TInput, object>>, AggregateUnwindOptions)

Creates an $unwind stage.

public static PipelineStageDefinition<TInput, BsonDocument> Unwind<TInput>(Expression<Func<TInput, object>> field, AggregateUnwindOptions<BsonDocument> options = null)

Parameters

field Expression<Func<TInput, object>>

The field to unwind.

options AggregateUnwindOptions<BsonDocument>

The options.

Returns

PipelineStageDefinition<TInput, BsonDocument>

The stage.

Type Parameters

TInput

The type of the input documents.

Unwind<TInput, TOutput>(Expression<Func<TInput, object>>, AggregateUnwindOptions)

Creates an $unwind stage.

public static PipelineStageDefinition<TInput, TOutput> Unwind<TInput, TOutput>(Expression<Func<TInput, object>> field, AggregateUnwindOptions<TOutput> options = null)

Parameters

field Expression<Func<TInput, object>>

The field to unwind.

options AggregateUnwindOptions

The options.

Returns

PipelineStageDefinition<TInput, TOutput>

The stage.

Type Parameters

TInput

The type of the input documents.

TOutput

The type of the output documents.