Method GraphLookup
GraphLookup<TInput, TFrom, TConnectFrom, TConnectTo, TStartWith, TAsElement, TAs, TOutput>(IMongoCollection<TFrom>, FieldDefinition<TFrom, TConnectFrom>, FieldDefinition<TFrom, TConnectTo>, AggregateExpressionDefinition<TInput, TStartWith>, FieldDefinition<TOutput, TAs>, FieldDefinition<TAsElement, int>, AggregateGraphLookupOptions<TFrom, TAsElement, TOutput>)
Creates a $graphLookup stage.
public static PipelineStageDefinition<TInput, TOutput> GraphLookup<TInput, TFrom, TConnectFrom, TConnectTo, TStartWith, TAsElement, TAs, TOutput>(IMongoCollection<TFrom> from, FieldDefinition<TFrom, TConnectFrom> connectFromField, FieldDefinition<TFrom, TConnectTo> connectToField, AggregateExpressionDefinition<TInput, TStartWith> startWith, FieldDefinition<TOutput, TAs> @as, FieldDefinition<TAsElement, int> depthField, AggregateGraphLookupOptions<TFrom, TAsElement, TOutput> options = null) where TAs : IEnumerable<TAsElement>
Parameters
fromIMongoCollection<TFrom>The from collection.
connectFromFieldFieldDefinition<TFrom, TConnectFrom>The connect from field.
connectToFieldFieldDefinition<TFrom, TConnectTo>The connect to field.
startWithAggregateExpressionDefinition<TInput, TStartWith>The start with value.
asFieldDefinition<TOutput, TAs>The as field.
depthFieldFieldDefinition<TAsElement, int>The depth field.
optionsAggregateGraphLookupOptions<TFrom, TAsElement, TOutput>The options.
Returns
- PipelineStageDefinition<TInput, TOutput>
The stage.
Type Parameters
TInputThe type of the input 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, TFrom, TConnectFrom, TConnectTo, TStartWith, TAs, TOutput>(IMongoCollection<TFrom>, FieldDefinition<TFrom, TConnectFrom>, FieldDefinition<TFrom, TConnectTo>, AggregateExpressionDefinition<TInput, TStartWith>, FieldDefinition<TOutput, TAs>, AggregateGraphLookupOptions<TFrom, TFrom, TOutput>)
Creates a $graphLookup stage.
public static PipelineStageDefinition<TInput, TOutput> GraphLookup<TInput, TFrom, TConnectFrom, TConnectTo, TStartWith, TAs, TOutput>(IMongoCollection<TFrom> from, FieldDefinition<TFrom, TConnectFrom> connectFromField, FieldDefinition<TFrom, TConnectTo> connectToField, AggregateExpressionDefinition<TInput, TStartWith> startWith, FieldDefinition<TOutput, TAs> @as, AggregateGraphLookupOptions<TFrom, TFrom, TOutput> options = null) where TAs : IEnumerable<TFrom>
Parameters
fromIMongoCollection<TFrom>The from collection.
connectFromFieldFieldDefinition<TFrom, TConnectFrom>The connect from field.
connectToFieldFieldDefinition<TFrom, TConnectTo>The connect to field.
startWithAggregateExpressionDefinition<TInput, TStartWith>The start with value.
asFieldDefinition<TOutput, TAs>The as field.
optionsAggregateGraphLookupOptions<TFrom, TFrom, TOutput>The options.
Returns
- PipelineStageDefinition<TInput, TOutput>
The stage.
Type Parameters
TInputThe type of the input 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, TFrom>(IMongoCollection<TFrom>, FieldDefinition<TFrom, BsonValue>, FieldDefinition<TFrom, BsonValue>, AggregateExpressionDefinition<TInput, BsonValue>, FieldDefinition<BsonDocument, IEnumerable<BsonDocument>>, FieldDefinition<BsonDocument, int>)
Creates a $graphLookup stage.
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
fromIMongoCollection<TFrom>The from collection.
connectFromFieldFieldDefinition<TFrom, BsonValue>The connect from field.
connectToFieldFieldDefinition<TFrom, BsonValue>The connect to field.
startWithAggregateExpressionDefinition<TInput, BsonValue>The start with value.
asFieldDefinition<BsonDocument, IEnumerable<BsonDocument>>The as field.
depthFieldFieldDefinition<BsonDocument, int>The depth field.
Returns
- PipelineStageDefinition<TInput, BsonDocument>
The fluent aggregate interface.
Type Parameters
TInputThe type of the input documents.
TFromThe type of the from documents.
GraphLookup<TInput, TFrom, TConnectFrom, TConnectTo, TStartWith, TAs, TOutput>(IMongoCollection<TFrom>, Expression<Func<TFrom, TConnectFrom>>, Expression<Func<TFrom, TConnectTo>>, Expression<Func<TInput, TStartWith>>, Expression<Func<TOutput, TAs>>, AggregateGraphLookupOptions<TFrom, TFrom, TOutput>, ExpressionTranslationOptions)
Creates a $graphLookup stage.
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 : IEnumerable<TFrom>
Parameters
fromIMongoCollection<TFrom>The from collection.
connectFromFieldExpression<Func<TFrom, TConnectFrom>>The connect from field.
connectToFieldExpression<Func<TFrom, TConnectTo>>The connect to field.
startWithExpression<Func<TInput, TStartWith>>The start with value.
asExpression<Func<TOutput, TAs>>The as field.
optionsAggregateGraphLookupOptions<TFrom, TFrom, TOutput>The options.
translationOptionsExpressionTranslationOptionsThe translation options.
Returns
- PipelineStageDefinition<TInput, TOutput>
The stage.
Type Parameters
TInputThe type of the input 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, TFrom, TConnectFrom, TConnectTo, TStartWith, TAsElement, TAs, TOutput>(IMongoCollection<TFrom>, Expression<Func<TFrom, TConnectFrom>>, Expression<Func<TFrom, TConnectTo>>, Expression<Func<TInput, TStartWith>>, Expression<Func<TOutput, TAs>>, Expression<Func<TAsElement, int>>, AggregateGraphLookupOptions<TFrom, TAsElement, TOutput>, ExpressionTranslationOptions)
Creates a $graphLookup stage.
public static PipelineStageDefinition<TInput, TOutput> GraphLookup<TInput, TFrom, TConnectFrom, TConnectTo, TStartWith, TAsElement, 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, Expression<Func<TAsElement, int>> depthField, AggregateGraphLookupOptions<TFrom, TAsElement, TOutput> options = null, ExpressionTranslationOptions translationOptions = null) where TAs : IEnumerable<TAsElement>
Parameters
fromIMongoCollection<TFrom>The from collection.
connectFromFieldExpression<Func<TFrom, TConnectFrom>>The connect from field.
connectToFieldExpression<Func<TFrom, TConnectTo>>The connect to field.
startWithExpression<Func<TInput, 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
- PipelineStageDefinition<TInput, TOutput>
The stage.
Type Parameters
TInputThe type of the input 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.