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.11.0+cb27a82ea70620ad1acad8058809be8302ae4f2a
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