Click or drag to resize

AggregateFluentBase<TResult>.Lookup<TForeignDocument, TNewResult> Method (String, FieldDefinition<TResult>, FieldDefinition<TForeignDocument>, FieldDefinition<TNewResult>, AggregateLookupOptions<TForeignDocument, TNewResult>)

Appends a lookup stage to the pipeline.

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.21.0+5a9c3311e158910b88195f290e6d4b1b2715d2b2
Syntax
public virtual IAggregateFluent<TNewResult> Lookup<TForeignDocument, TNewResult>(
	string foreignCollectionName,
	FieldDefinition<TResult> localField,
	FieldDefinition<TForeignDocument> foreignField,
	FieldDefinition<TNewResult> as,
	AggregateLookupOptions<TForeignDocument, TNewResult> options
)

Parameters

foreignCollectionName
Type: System.String
Name of the other collection.
localField
Type: MongoDB.Driver.FieldDefinition<TResult>
The local field.
foreignField
Type: MongoDB.Driver.FieldDefinition<TForeignDocument>
The foreign field.
as
Type: MongoDB.Driver.FieldDefinition<TNewResult>
The field in TNewResult to place the foreign results.
options
Type: MongoDB.Driver.AggregateLookupOptions<TForeignDocument, TNewResult>
The options.

Type Parameters

TForeignDocument
The type of the foreign document.
TNewResult
The type of the new result.

Return Value

Type: IAggregateFluent<TNewResult>
The fluent aggregate interface.

Implements

IAggregateFluent<TResult>.Lookup<TForeignDocument, TNewResult>(String, FieldDefinition<TResult>, FieldDefinition<TForeignDocument>, FieldDefinition<TNewResult>, AggregateLookupOptions<TForeignDocument, TNewResult>)
See Also