Method UnionWith
UnionWith<TInput, TWith, TOutput>(PipelineDefinition<TInput, TOutput>, IMongoCollection<TWith>, PipelineDefinition<TWith, TOutput>)
Appends a $unionWith stage to the pipeline.
public static PipelineDefinition<TInput, TOutput> UnionWith<TInput, TWith, TOutput>(this PipelineDefinition<TInput, TOutput> pipeline, IMongoCollection<TWith> withCollection, PipelineDefinition<TWith, TOutput> withPipeline = null)
Parameters
pipelinePipelineDefinition<TInput, TOutput>The pipeline.
withCollectionIMongoCollection<TWith>The with collection.
withPipelinePipelineDefinition<TWith, TOutput>The with pipeline.
Returns
- PipelineDefinition<TInput, TOutput>
A new pipeline with an additional stage.
Type Parameters
TInputThe type of the input documents.
TWithThe type of the with collection documents.
TOutputThe type of the output documents.