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.13.1-v2-13-x1+a7f8afe27855f38f4f72157d11ba2ae73895502e
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