Click or drag to resize

PipelineStageDefinitionBuilderGraphLookupTInput, TFrom Method (IMongoCollectionTFrom, FieldDefinitionTFrom, BsonValue, FieldDefinitionTFrom, BsonValue, AggregateExpressionDefinitionTInput, BsonValue, FieldDefinitionBsonDocument, IEnumerableBsonDocument, FieldDefinitionBsonDocument, Int32)

Creates a $graphLookup stage.

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.15.0+f503bf610759c13f78cff9a3c01e91453185d2ed
Syntax
public static PipelineStageDefinition<TInput, BsonDocument> GraphLookup<TInput, TFrom>(
	IMongoCollection<TFrom> from,
	FieldDefinition<TFrom, BsonValue> connectFromField,
	FieldDefinition<TFrom, BsonValue> connectToField,
	AggregateExpressionDefinition<TInput, BsonValue> startWith,
	FieldDefinition<BsonDocument, IEnumerable<BsonDocument>> as,
	FieldDefinition<BsonDocument, int> depthField = null
)

Parameters

from
Type: MongoDB.DriverIMongoCollectionTFrom
The from collection.
connectFromField
Type: MongoDB.DriverFieldDefinitionTFrom, BsonValue
The connect from field.
connectToField
Type: MongoDB.DriverFieldDefinitionTFrom, BsonValue
The connect to field.
startWith
Type: MongoDB.DriverAggregateExpressionDefinitionTInput, BsonValue
The start with value.
as
Type: MongoDB.DriverFieldDefinitionBsonDocument, IEnumerableBsonDocument
The as field.
depthField (Optional)
Type: MongoDB.DriverFieldDefinitionBsonDocument, Int32
The depth field.

Type Parameters

TInput
The type of the input documents.
TFrom
The type of the from documents.

Return Value

Type: PipelineStageDefinitionTInput, BsonDocument
The fluent aggregate interface.
See Also