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
from
IMongoCollection<TFrom>The from collection.
connectFromField
FieldDefinition<TFrom, TConnectFrom>The connect from field.
connectToField
FieldDefinition<TFrom, TConnectTo>The connect to field.
startWith
AggregateExpressionDefinition<TInput, TStartWith>The start with value.
as
FieldDefinition<TOutput, TAs>The as field.
depthField
FieldDefinition<TAsElement, int>The depth field.
options
AggregateGraphLookupOptions<TFrom, TAsElement, TOutput>The options.
Returns
- PipelineStageDefinition<TInput, TOutput>
The stage.
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}).
TAsElement
The type of the as field elements.
TAs
The type of the as field.
TOutput
The 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
from
IMongoCollection<TFrom>The from collection.
connectFromField
FieldDefinition<TFrom, TConnectFrom>The connect from field.
connectToField
FieldDefinition<TFrom, TConnectTo>The connect to field.
startWith
AggregateExpressionDefinition<TInput, TStartWith>The start with value.
as
FieldDefinition<TOutput, TAs>The as field.
options
AggregateGraphLookupOptions<TFrom, TFrom, TOutput>The options.
Returns
- PipelineStageDefinition<TInput, TOutput>
The stage.
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.
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
from
IMongoCollection<TFrom>The from collection.
connectFromField
FieldDefinition<TFrom, BsonValue>The connect from field.
connectToField
FieldDefinition<TFrom, BsonValue>The connect to field.
startWith
AggregateExpressionDefinition<TInput, BsonValue>The start with value.
as
FieldDefinition<BsonDocument, IEnumerable<BsonDocument>>The as field.
depthField
FieldDefinition<BsonDocument, int>The depth field.
Returns
- PipelineStageDefinition<TInput, BsonDocument>
The fluent aggregate interface.
Type Parameters
TInput
The type of the input documents.
TFrom
The 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>)
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) where TAs : IEnumerable<TFrom>
Parameters
from
IMongoCollection<TFrom>The from collection.
connectFromField
Expression<Func<TFrom, TConnectFrom>>The connect from field.
connectToField
Expression<Func<TFrom, TConnectTo>>The connect to field.
startWith
Expression<Func<TInput, TStartWith>>The start with value.
as
Expression<Func<TOutput, TAs>>The as field.
options
AggregateGraphLookupOptions<TFrom, TFrom, TOutput>The options.
Returns
- PipelineStageDefinition<TInput, TOutput>
The stage.
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.
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>)
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) where TAs : IEnumerable<TAsElement>
Parameters
from
IMongoCollection<TFrom>The from collection.
connectFromField
Expression<Func<TFrom, TConnectFrom>>The connect from field.
connectToField
Expression<Func<TFrom, TConnectTo>>The connect to field.
startWith
Expression<Func<TInput, TStartWith>>The start with value.
as
Expression<Func<TOutput, TAs>>The as field.
depthField
Expression<Func<TAsElement, int>>The depth field.
options
AggregateGraphLookupOptions<TFrom, TAsElement, TOutput>The options.
Returns
- PipelineStageDefinition<TInput, TOutput>
The stage.
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}).
TAsElement
The type of the as field elements.
TAs
The type of the as field.
TOutput
The type of the output documents.