Method Project
Project<TInput, TOutput>(ProjectionDefinition<TInput, TOutput>)
Creates a $project stage.
public static PipelineStageDefinition<TInput, TOutput> Project<TInput, TOutput>(ProjectionDefinition<TInput, TOutput> projection)
Parameters
projection
ProjectionDefinition <TInput, TOutput>The projection.
Returns
- Pipeline
Stage <TInput, TOutput>Definition The stage.
Type Parameters
TInput
The type of the input documents.
TOutput
The type of the output documents.
Project<TInput>(ProjectionDefinition<TInput, BsonDocument>)
Creates a $project stage.
public static PipelineStageDefinition<TInput, BsonDocument> Project<TInput>(ProjectionDefinition<TInput, BsonDocument> projection)
Parameters
projection
ProjectionDefinition <TInput, BsonDocument >The projection.
Returns
- Pipeline
Stage <TInput, BsonDefinition Document > The stage.
Type Parameters
TInput
The type of the input documents.
Project<TInput, TOutput>(Expression<Func<TInput, TOutput>>)
Creates a $project stage.
public static PipelineStageDefinition<TInput, TOutput> Project<TInput, TOutput>(Expression<Func<TInput, TOutput>> projection)
Parameters
projection
Expression<Func<TInput, TOutput>>The projection.
Returns
- Pipeline
Stage <TInput, TOutput>Definition The stage.
Type Parameters
TInput
The type of the input documents.
TOutput
The type of the output documents.