Method Project
Project<TInput, TIntermediate, TOutput>(PipelineDefinition<TInput, TIntermediate>, ProjectionDefinition<TIntermediate, TOutput>)
Appends a $project stage to the pipeline.
public static PipelineDefinition<TInput, TOutput> Project<TInput, TIntermediate, TOutput>(this PipelineDefinition<TInput, TIntermediate> pipeline, ProjectionDefinition<TIntermediate, TOutput> projection)Parameters
- pipelinePipelineDefinition<TInput, TIntermediate>
- The pipeline. 
- projectionProjectionDefinition<TIntermediate, TOutput>
- The projection. 
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
Project<TInput, TIntermediate>(PipelineDefinition<TInput, TIntermediate>, ProjectionDefinition<TIntermediate, BsonDocument>)
Appends a project stage to the pipeline.
public static PipelineDefinition<TInput, BsonDocument> Project<TInput, TIntermediate>(this PipelineDefinition<TInput, TIntermediate> pipeline, ProjectionDefinition<TIntermediate, BsonDocument> projection)Parameters
- pipelinePipelineDefinition<TInput, TIntermediate>
- The pipeline. 
- projectionProjectionDefinition<TIntermediate, BsonDocument>
- The projection. 
Returns
- PipelineDefinition<TInput, BsonDocument>
- A new pipeline with an additional stage. 
Type Parameters
- TInput
- The type of the input documents. 
- TIntermediate
- The type of the intermediate documents. 
Project<TInput, TIntermediate, TOutput>(PipelineDefinition<TInput, TIntermediate>, Expression<Func<TIntermediate, TOutput>>)
Appends a project stage to the pipeline.
public static PipelineDefinition<TInput, TOutput> Project<TInput, TIntermediate, TOutput>(this PipelineDefinition<TInput, TIntermediate> pipeline, Expression<Func<TIntermediate, TOutput>> projection)Parameters
- pipelinePipelineDefinition<TInput, TIntermediate>
- The pipeline. 
- projectionExpression<Func<TIntermediate, TOutput>>
- The projection. 
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.