Click or drag to resize

PipelineStageDefinitionBuilderLookupTInput, TForeignDocument, TAsElement, TAs, TOutput Method (IMongoCollectionTForeignDocument, BsonDocument, PipelineDefinitionTForeignDocument, TAsElement, ExpressionFuncTOutput, TAs, AggregateLookupOptionsTForeignDocument, TOutput)

Creates a $lookup stage.

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.19.1+3a2a09dd959482f665ffbb5df2557ec541597af4
Syntax
public static PipelineStageDefinition<TInput, TOutput> Lookup<TInput, TForeignDocument, TAsElement, TAs, TOutput>(
	IMongoCollection<TForeignDocument> foreignCollection,
	BsonDocument let,
	PipelineDefinition<TForeignDocument, TAsElement> lookupPipeline,
	Expression<Func<TOutput, TAs>> as,
	AggregateLookupOptions<TForeignDocument, TOutput> options = null
)
where TAs : Object, IEnumerable<TAsElement>

Parameters

foreignCollection
Type: MongoDB.DriverIMongoCollectionTForeignDocument
The foreign collection.
let
Type: MongoDB.BsonBsonDocument
The "let" definition.
lookupPipeline
Type: MongoDB.DriverPipelineDefinitionTForeignDocument, TAsElement
The lookup pipeline.
as
Type: System.Linq.ExpressionsExpressionFuncTOutput, TAs
The as field in TOutput in which to place the results of the lookup pipeline.
options (Optional)
Type: MongoDB.DriverAggregateLookupOptionsTForeignDocument, TOutput
The options.

Type Parameters

TInput
The type of the input documents.
TForeignDocument
The type of the foreign collection documents.
TAsElement
The type of the as field elements.
TAs
The type of the as field.
TOutput
The type of the output documents.

Return Value

Type: PipelineStageDefinitionTInput, TOutput
The stage.
See Also