Method GraphLookup
GraphLookup<TInput, TIntermediate, TFrom, TConnectFrom, TConnectTo, TStartWith, TAsElement, TAs, TOutput>(PipelineDefinition<TInput, TIntermediate>, IMongoCollection<TFrom>, FieldDefinition<TFrom, TConnectFrom>, FieldDefinition<TFrom, TConnectTo>, AggregateExpressionDefinition<TIntermediate, TStartWith>, FieldDefinition<TOutput, TAs>, FieldDefinition<TAsElement, int>, AggregateGraphLookupOptions<TFrom, TAsElement, TOutput>)
Appends a $graphLookup stage to the pipeline.
public static PipelineDefinition<TInput, TOutput> GraphLookup<TInput, TIntermediate, TFrom, TConnectFrom, TConnectTo, TStartWith, TAsElement, TAs, TOutput>(this PipelineDefinition<TInput, TIntermediate> pipeline, IMongoCollection<TFrom> from, FieldDefinition<TFrom, TConnectFrom> connectFromField, FieldDefinition<TFrom, TConnectTo> connectToField, AggregateExpressionDefinition<TIntermediate, TStartWith> startWith, FieldDefinition<TOutput, TAs> @as, FieldDefinition<TAsElement, int> depthField, AggregateGraphLookupOptions<TFrom, TAsElement, TOutput> options = null) where TAs : IEnumerable<TAsElement>
Parameters
pipelinePipelineDefinition<TInput, TIntermediate>The pipeline.
fromIMongoCollection<TFrom>The from collection.
connectFromFieldFieldDefinition<TFrom, TConnectFrom>The connect from field.
connectToFieldFieldDefinition<TFrom, TConnectTo>The connect to field.
startWithAggregateExpressionDefinition<TIntermediate, TStartWith>The start with value.
asFieldDefinition<TOutput, TAs>The as field.
depthFieldFieldDefinition<TAsElement, int>The depth field.
optionsAggregateGraphLookupOptions<TFrom, TAsElement, TOutput>The options.
Returns
- PipelineDefinition<TInput, TOutput>
A new pipeline with an additional stage.
Type Parameters
TInputThe type of the input documents.
TIntermediateThe type of the intermediate documents.
TFromThe type of the from documents.
TConnectFromThe type of the connect from field (must be either TConnectTo or a type that implements IEnumerable{TConnectTo}).
TConnectToThe type of the connect to field.
TStartWithThe type of the start with expression (must be either TConnectTo or a type that implements IEnumerable{TConnectTo}).
TAsElementThe type of the as field elements.
TAsThe type of the as field.
TOutputThe type of the output documents.
GraphLookup<TInput, TIntermediate, TFrom, TConnectFrom, TConnectTo, TStartWith, TAs, TOutput>(PipelineDefinition<TInput, TIntermediate>, IMongoCollection<TFrom>, FieldDefinition<TFrom, TConnectFrom>, FieldDefinition<TFrom, TConnectTo>, AggregateExpressionDefinition<TIntermediate, TStartWith>, FieldDefinition<TOutput, TAs>, AggregateGraphLookupOptions<TFrom, TFrom, TOutput>)
Appends a $graphLookup stage to the pipeline.
public static PipelineDefinition<TInput, TOutput> GraphLookup<TInput, TIntermediate, TFrom, TConnectFrom, TConnectTo, TStartWith, TAs, TOutput>(this PipelineDefinition<TInput, TIntermediate> pipeline, IMongoCollection<TFrom> from, FieldDefinition<TFrom, TConnectFrom> connectFromField, FieldDefinition<TFrom, TConnectTo> connectToField, AggregateExpressionDefinition<TIntermediate, TStartWith> startWith, FieldDefinition<TOutput, TAs> @as, AggregateGraphLookupOptions<TFrom, TFrom, TOutput> options = null) where TAs : IEnumerable<TFrom>
Parameters
pipelinePipelineDefinition<TInput, TIntermediate>The pipeline.
fromIMongoCollection<TFrom>The from collection.
connectFromFieldFieldDefinition<TFrom, TConnectFrom>The connect from field.
connectToFieldFieldDefinition<TFrom, TConnectTo>The connect to field.
startWithAggregateExpressionDefinition<TIntermediate, TStartWith>The start with value.
asFieldDefinition<TOutput, TAs>The as field.
optionsAggregateGraphLookupOptions<TFrom, TFrom, TOutput>The options.
Returns
- PipelineDefinition<TInput, TOutput>
A new pipeline with an additional stage.
Type Parameters
TInputThe type of the input documents.
TIntermediateThe type of the intermediate documents.
TFromThe type of the from documents.
TConnectFromThe type of the connect from field (must be either TConnectTo or a type that implements IEnumerable{TConnectTo}).
TConnectToThe type of the connect to field.
TStartWithThe type of the start with expression (must be either TConnectTo or a type that implements IEnumerable{TConnectTo}).
TAsThe type of the as field.
TOutputThe type of the output documents.
GraphLookup<TInput, TIntermediate, TFrom>(PipelineDefinition<TInput, TIntermediate>, IMongoCollection<TFrom>, FieldDefinition<TFrom, BsonValue>, FieldDefinition<TFrom, BsonValue>, AggregateExpressionDefinition<TIntermediate, BsonValue>, FieldDefinition<BsonDocument, IEnumerable<BsonDocument>>, FieldDefinition<BsonDocument, int>)
Appends a $graphLookup stage to the pipeline.
public static PipelineDefinition<TInput, BsonDocument> GraphLookup<TInput, TIntermediate, TFrom>(this PipelineDefinition<TInput, TIntermediate> pipeline, IMongoCollection<TFrom> from, FieldDefinition<TFrom, BsonValue> connectFromField, FieldDefinition<TFrom, BsonValue> connectToField, AggregateExpressionDefinition<TIntermediate, BsonValue> startWith, FieldDefinition<BsonDocument, IEnumerable<BsonDocument>> @as, FieldDefinition<BsonDocument, int> depthField = null)
Parameters
pipelinePipelineDefinition<TInput, TIntermediate>The pipeline.
fromIMongoCollection<TFrom>The from collection.
connectFromFieldFieldDefinition<TFrom, BsonValue>The connect from field.
connectToFieldFieldDefinition<TFrom, BsonValue>The connect to field.
startWithAggregateExpressionDefinition<TIntermediate, BsonValue>The start with value.
asFieldDefinition<BsonDocument, IEnumerable<BsonDocument>>The as field.
depthFieldFieldDefinition<BsonDocument, int>The depth field.
Returns
- PipelineDefinition<TInput, BsonDocument>
A new pipeline with an additional stage.
Type Parameters
TInputThe type of the input documents.
TIntermediateThe type of the intermediate documents.
TFromThe type of the from documents.
GraphLookup<TInput, TIntermediate, TFrom, TConnectFrom, TConnectTo, TStartWith, TAs, TOutput>(PipelineDefinition<TInput, TIntermediate>, IMongoCollection<TFrom>, Expression<Func<TFrom, TConnectFrom>>, Expression<Func<TFrom, TConnectTo>>, Expression<Func<TIntermediate, TStartWith>>, Expression<Func<TOutput, TAs>>, AggregateGraphLookupOptions<TFrom, TFrom, TOutput>, ExpressionTranslationOptions)
Appends a $graphLookup stage to the pipeline.
public static PipelineDefinition<TInput, TOutput> GraphLookup<TInput, TIntermediate, TFrom, TConnectFrom, TConnectTo, TStartWith, TAs, TOutput>(this PipelineDefinition<TInput, TIntermediate> pipeline, IMongoCollection<TFrom> from, Expression<Func<TFrom, TConnectFrom>> connectFromField, Expression<Func<TFrom, TConnectTo>> connectToField, Expression<Func<TIntermediate, TStartWith>> startWith, Expression<Func<TOutput, TAs>> @as, AggregateGraphLookupOptions<TFrom, TFrom, TOutput> options = null, ExpressionTranslationOptions translationOptions = null) where TAs : IEnumerable<TFrom>
Parameters
pipelinePipelineDefinition<TInput, TIntermediate>The pipeline.
fromIMongoCollection<TFrom>The from collection.
connectFromFieldExpression<Func<TFrom, TConnectFrom>>The connect from field.
connectToFieldExpression<Func<TFrom, TConnectTo>>The connect to field.
startWithExpression<Func<TIntermediate, TStartWith>>The start with value.
asExpression<Func<TOutput, TAs>>The as field.
optionsAggregateGraphLookupOptions<TFrom, TFrom, TOutput>The options.
translationOptionsExpressionTranslationOptionsThe translation options.
Returns
- PipelineDefinition<TInput, TOutput>
A new pipeline with an additional stage.
Type Parameters
TInputThe type of the input documents.
TIntermediateThe type of the intermediate documents.
TFromThe type of the from documents.
TConnectFromThe type of the connect from field (must be either TConnectTo or a type that implements IEnumerable{TConnectTo}).
TConnectToThe type of the connect to field.
TStartWithThe type of the start with expression (must be either TConnectTo or a type that implements IEnumerable{TConnectTo}).
TAsThe type of the as field.
TOutputThe type of the output documents.
GraphLookup<TInput, TIntermediate, TFrom, TConnectFrom, TConnectTo, TStartWith, TAsElement, TAs, TOutput>(PipelineDefinition<TInput, TIntermediate>, IMongoCollection<TFrom>, Expression<Func<TFrom, TConnectFrom>>, Expression<Func<TFrom, TConnectTo>>, Expression<Func<TIntermediate, TStartWith>>, Expression<Func<TOutput, TAs>>, Expression<Func<TAsElement, int>>, AggregateGraphLookupOptions<TFrom, TAsElement, TOutput>, ExpressionTranslationOptions)
Appends a $graphLookup stage to the pipeline.
public static PipelineDefinition<TInput, TOutput> GraphLookup<TInput, TIntermediate, TFrom, TConnectFrom, TConnectTo, TStartWith, TAsElement, TAs, TOutput>(this PipelineDefinition<TInput, TIntermediate> pipeline, IMongoCollection<TFrom> from, Expression<Func<TFrom, TConnectFrom>> connectFromField, Expression<Func<TFrom, TConnectTo>> connectToField, Expression<Func<TIntermediate, TStartWith>> startWith, Expression<Func<TOutput, TAs>> @as, Expression<Func<TAsElement, int>> depthField, AggregateGraphLookupOptions<TFrom, TAsElement, TOutput> options = null, ExpressionTranslationOptions translationOptions = null) where TAs : IEnumerable<TAsElement>
Parameters
pipelinePipelineDefinition<TInput, TIntermediate>The pipeline.
fromIMongoCollection<TFrom>The from collection.
connectFromFieldExpression<Func<TFrom, TConnectFrom>>The connect from field.
connectToFieldExpression<Func<TFrom, TConnectTo>>The connect to field.
startWithExpression<Func<TIntermediate, TStartWith>>The start with value.
asExpression<Func<TOutput, TAs>>The as field.
depthFieldExpression<Func<TAsElement, int>>The depth field.
optionsAggregateGraphLookupOptions<TFrom, TAsElement, TOutput>The options.
translationOptionsExpressionTranslationOptionsThe translation options.
Returns
- PipelineDefinition<TInput, TOutput>
A new pipeline with an additional stage.
Type Parameters
TInputThe type of the input documents.
TIntermediateThe type of the intermediate documents.
TFromThe type of the from documents.
TConnectFromThe type of the connect from field (must be either TConnectTo or a type that implements IEnumerable{TConnectTo}).
TConnectToThe type of the connect to field.
TStartWithThe type of the start with expression (must be either TConnectTo or a type that implements IEnumerable{TConnectTo}).
TAsElementThe type of the as field elements.
TAsThe type of the as field.
TOutputThe type of the output documents.