Click or drag to resize

AggregateFluentBase<TResult>.GraphLookup<TFrom, TConnectFrom, TConnectTo, TStartWith, TAsElement, TAs, TNewResult> Method

Appends a $graphLookup stage to the pipeline.

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.21.0+5a9c3311e158910b88195f290e6d4b1b2715d2b2
Syntax
public virtual IAggregateFluent<TNewResult> GraphLookup<TFrom, TConnectFrom, TConnectTo, TStartWith, TAsElement, TAs, TNewResult>(
	IMongoCollection<TFrom> from,
	FieldDefinition<TFrom, TConnectFrom> connectFromField,
	FieldDefinition<TFrom, TConnectTo> connectToField,
	AggregateExpressionDefinition<TResult, TStartWith> startWith,
	FieldDefinition<TNewResult, TAs> as,
	FieldDefinition<TAsElement, int> depthField,
	AggregateGraphLookupOptions<TFrom, TAsElement, TNewResult> options = null
)
where TAs : Object, IEnumerable<TAsElement>

Parameters

from
Type: MongoDB.Driver.IMongoCollection<TFrom>
The from collection.
connectFromField
Type: MongoDB.Driver.FieldDefinition<TFrom, TConnectFrom>
The connect from field.
connectToField
Type: MongoDB.Driver.FieldDefinition<TFrom, TConnectTo>
The connect to field.
startWith
Type: MongoDB.Driver.AggregateExpressionDefinition<TResult, TStartWith>
The start with value.
as
Type: MongoDB.Driver.FieldDefinition<TNewResult, TAs>
The as field.
depthField
Type: MongoDB.Driver.FieldDefinition<TAsElement, Int32>
The depth field.
options (Optional)
Type: MongoDB.Driver.AggregateGraphLookupOptions<TFrom, TAsElement, TNewResult>
The options.

Type Parameters

TFrom
The type of the from documents.
TConnectFrom
The type of the connect from field (must be either TConnectTo or a type that implements IEnumerable{TConnectTo}).
TConnectTo
The type of the connect to field.
TStartWith
The type of the start with expression (must be either TConnectTo or a type that implements IEnumerable{TConnectTo}).
TAsElement
The type of the as field elements.
TAs
The type of the as field.
TNewResult
The type of the new result (must be same as TResult with an additional as field).

Return Value

Type: IAggregateFluent<TNewResult>
The fluent aggregate interface.

Implements

IAggregateFluent<TResult>.GraphLookup<TFrom, TConnectFrom, TConnectTo, TStartWith, TAsElement, TAs, TNewResult>(IMongoCollection<TFrom>, FieldDefinition<TFrom, TConnectFrom>, FieldDefinition<TFrom, TConnectTo>, AggregateExpressionDefinition<TResult, TStartWith>, FieldDefinition<TNewResult, TAs>, FieldDefinition<TAsElement, Int32>, AggregateGraphLookupOptions<TFrom, TAsElement, TNewResult>)
See Also