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
pipelinePipelineDefinition<TInput, TOutput>The pipeline.
fieldsSetFieldDefinitions<TOutput>The fields to set.
Returns
- PipelineDefinition<TInput, TOutput>
A new pipeline with an additional stage.
Type Parameters
TInputThe type of the input documents.
TOutputThe 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
pipelinePipelineDefinition<TInput, TOutput>The pipeline.
fieldsExpression<Func<TOutput, TFields>>The fields to set.
Returns
- PipelineDefinition<TInput, TOutput>
A new pipeline with an additional stage.
Type Parameters
TInputThe type of the input documents.
TOutputThe type of the output documents.
TFieldsThe type of object specifying the fields to set.