Method AppendStage
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
sourceIMongoQueryable<TSource>A sequence of values.
stagePipelineStageDefinition<TSource, TResult>The stage to append.
resultSerializerIBsonSerializer<TResult>The result serializer.
Returns
- IMongoQueryable<TResult>
The queryable with a new stage appended.
Type Parameters
TSourceThe type of the elements of
source.TResultThe type of the result values returned by the appended stage.