Click or drag to resize

AggregateFluentBase<TResult>.UnionWith<TWith> Method

Appends an $unionWith stage to the pipeline.

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.21.0+5a9c3311e158910b88195f290e6d4b1b2715d2b2
Syntax
public virtual IAggregateFluent<TResult> UnionWith<TWith>(
	IMongoCollection<TWith> withCollection,
	PipelineDefinition<TWith, TResult> withPipeline = null
)

Parameters

withCollection
Type: MongoDB.Driver.IMongoCollection<TWith>
The with collection.
withPipeline (Optional)
Type: MongoDB.Driver.PipelineDefinition<TWith, TResult>
The with pipeline.

Type Parameters

TWith
The type of the with collection documents.

Return Value

Type: IAggregateFluent<TResult>
The fluent aggregate interface.

Implements

IAggregateFluent<TResult>.UnionWith<TWith>(IMongoCollection<TWith>, PipelineDefinition<TWith, TResult>)
See Also