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.12.2+a4a3888f4fb51bb518b1eb5002effc2d47f2ea6a
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