Click or drag to resize

PipelineStageDefinitionBuilderGraphLookupTInput, TFrom, TConnectFrom, TConnectTo, TStartWith, TAs, TOutput Method (IMongoCollectionTFrom, ExpressionFuncTFrom, TConnectFrom, ExpressionFuncTFrom, TConnectTo, ExpressionFuncTInput, TStartWith, ExpressionFuncTOutput, TAs, AggregateGraphLookupOptionsTFrom, TFrom, TOutput, ExpressionTranslationOptions)

Creates a $graphLookup stage.

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.15.0+f503bf610759c13f78cff9a3c01e91453185d2ed
Syntax
public static PipelineStageDefinition<TInput, TOutput> GraphLookup<TInput, TFrom, TConnectFrom, TConnectTo, TStartWith, TAs, TOutput>(
	IMongoCollection<TFrom> from,
	Expression<Func<TFrom, TConnectFrom>> connectFromField,
	Expression<Func<TFrom, TConnectTo>> connectToField,
	Expression<Func<TInput, TStartWith>> startWith,
	Expression<Func<TOutput, TAs>> as,
	AggregateGraphLookupOptions<TFrom, TFrom, TOutput> options = null,
	ExpressionTranslationOptions translationOptions = null
)
where TAs : Object, IEnumerable<TFrom>

Parameters

from
Type: MongoDB.DriverIMongoCollectionTFrom
The from collection.
connectFromField
Type: System.Linq.ExpressionsExpressionFuncTFrom, TConnectFrom
The connect from field.
connectToField
Type: System.Linq.ExpressionsExpressionFuncTFrom, TConnectTo
The connect to field.
startWith
Type: System.Linq.ExpressionsExpressionFuncTInput, TStartWith
The start with value.
as
Type: System.Linq.ExpressionsExpressionFuncTOutput, TAs
The as field.
options (Optional)
Type: MongoDB.DriverAggregateGraphLookupOptionsTFrom, TFrom, TOutput
The options.
translationOptions (Optional)
Type: MongoDB.DriverExpressionTranslationOptions
The translation options.

Type Parameters

TInput
The type of the input documents.
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}).
TAs
The type of the as field.
TOutput
The type of the output documents.

Return Value

Type: PipelineStageDefinitionTInput, TOutput
The stage.
See Also