Click or drag to resize

IAggregateFluentTResultLookupTForeignDocument, TAsElement, TAs, TNewResult Method (IMongoCollectionTForeignDocument, BsonDocument, PipelineDefinitionTForeignDocument, TAsElement, FieldDefinitionTNewResult, TAs, AggregateLookupOptionsTForeignDocument, TNewResult)

Appends a lookup stage to the pipeline.

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.11.0+cb27a82ea70620ad1acad8058809be8302ae4f2a
Syntax
IAggregateFluent<TNewResult> Lookup<TForeignDocument, TAsElement, TAs, TNewResult>(
	IMongoCollection<TForeignDocument> foreignCollection,
	BsonDocument let,
	PipelineDefinition<TForeignDocument, TAsElement> lookupPipeline,
	FieldDefinition<TNewResult, TAs> as,
	AggregateLookupOptions<TForeignDocument, TNewResult> 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.DriverFieldDefinitionTNewResult, TAs
The as field in TNewResult in which to place the results of the lookup pipeline.
options (Optional)
Type: MongoDB.DriverAggregateLookupOptionsTForeignDocument, TNewResult
The options.

Type Parameters

TForeignDocument
The type of the foreign collection documents.
TAsElement
The type of the as field elements.
TAs
The type of the as field.
TNewResult
The type of the new result.

Return Value

Type: IAggregateFluentTNewResult
The fluent aggregate interface.
See Also