Method Set
Set<TInput, TOutput>(PipelineDefinition<TInput, TOutput>, SetFieldDefinitions<TOutput>)
Appends a $set stage to the pipeline.
public static PipelineDefinition<TInput, TOutput> Set<TInput, TOutput>(this PipelineDefinition<TInput, TOutput> pipeline, SetFieldDefinitions<TOutput> fields)
Parameters
pipeline
PipelineDefinition<TInput, TOutput>The pipeline.
fields
SetFieldDefinitions<TOutput>The fields to set.
Returns
- PipelineDefinition<TInput, TOutput>
A new pipeline with an additional stage.
Type Parameters
TInput
The type of the input documents.
TOutput
The type of the output documents.
Set<TInput, TOutput, TFields>(PipelineDefinition<TInput, TOutput>, Expression<Func<TOutput, TFields>>)
Appends a $set stage to the pipeline.
public static PipelineDefinition<TInput, TOutput> Set<TInput, TOutput, TFields>(this PipelineDefinition<TInput, TOutput> pipeline, Expression<Func<TOutput, TFields>> fields)
Parameters
pipeline
PipelineDefinition<TInput, TOutput>The pipeline.
fields
Expression<Func<TOutput, TFields>>The fields to set.
Returns
- PipelineDefinition<TInput, TOutput>
A new pipeline with an additional stage.
Type Parameters
TInput
The type of the input documents.
TOutput
The type of the output documents.
TFields
The type of object specifying the fields to set.