Click or drag to resize

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

Creates a $lookup stage.

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.16.0+eeafbea0921243a5868b81984e1083a07c1f75bc
Syntax
public static PipelineStageDefinition<TInput, TOutput> Lookup<TInput, TForeignDocument, TAsElement, TAs, TOutput>(
	IMongoCollection<TForeignDocument> foreignCollection,
	BsonDocument let,
	PipelineDefinition<TForeignDocument, TAsElement> lookupPipeline,
	FieldDefinition<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: MongoDB.DriverFieldDefinitionTOutput, 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