Method Set
Set<TInput>(SetFieldDefinitions<TInput>)
Creates a $set stage.
public static PipelineStageDefinition<TInput, TInput> Set<TInput>(SetFieldDefinitions<TInput> fields)
Parameters
fields
SetFieldDefinitions<TInput>The fields to set.
Returns
- PipelineStageDefinition<TInput, TInput>
The stage.
Type Parameters
TInput
The type of the input documents.
Set<TInput, TFields>(Expression<Func<TInput, TFields>>)
Creates a $set stage.
public static PipelineStageDefinition<TInput, TInput> Set<TInput, TFields>(Expression<Func<TInput, TFields>> fields)
Parameters
fields
Expression<Func<TInput, TFields>>The fields to set.
Returns
- PipelineStageDefinition<TInput, TInput>
The stage.
Type Parameters
TInput
The type of the input documents.
TFields
The type of object specifying the fields to set.