Table of Contents

Method AppendStage

Namespace
MongoDB.Driver.Linq
Assembly
MongoDB.Driver.dll

AppendStage<TSource, TResult>(IMongoQueryable<TSource>, PipelineStageDefinition<TSource, TResult>, IBsonSerializer<TResult>)

Appends an arbitrary stage to the LINQ pipeline.

public static IMongoQueryable<TResult> AppendStage<TSource, TResult>(this IMongoQueryable<TSource> source, PipelineStageDefinition<TSource, TResult> stage, IBsonSerializer<TResult> resultSerializer = null)

Parameters

source IMongoQueryable<TSource>

A sequence of values.

stage PipelineStageDefinition<TSource, TResult>

The stage to append.

resultSerializer IBsonSerializer<TResult>

The result serializer.

Returns

IMongoQueryable<TResult>

The queryable with a new stage appended.

Type Parameters

TSource

The type of the elements of source.

TResult

The type of the result values returned by the appended stage.