Table of Contents

Method Merge

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

Merge<TInput, TIntermediate, TOutput>(PipelineDefinition<TInput, TIntermediate>, IMongoCollection<TOutput>, MergeStageOptions<TOutput>)

Appends a $merge stage to the pipeline.

public static PipelineDefinition<TInput, TOutput> Merge<TInput, TIntermediate, TOutput>(this PipelineDefinition<TInput, TIntermediate> pipeline, IMongoCollection<TOutput> outputCollection, MergeStageOptions<TOutput> mergeOptions)

Parameters

pipeline PipelineDefinition<TInput, TIntermediate>

The pipeline.

outputCollection IMongoCollection<TOutput>

The output collection.

mergeOptions MergeStageOptions<TOutput>

The merge options.

Returns

PipelineDefinition<TInput, TOutput>

A new pipeline with an additional stage.

Type Parameters

TInput

The type of the input documents.

TIntermediate

The type of the intermediate documents.

TOutput

The type of the output documents.

Exceptions

NotSupportedException