Table of Contents

Method AppendStage

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

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

Appends an arbitrary stage to the LINQ pipeline.

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

Parameters

source IQueryable<TSource>

A sequence of values.

stage PipelineStageDefinition<TSource, TResult>

The stage to append.

resultSerializer IBsonSerializer<TResult>

The result serializer.

Returns

IQueryable<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.