Method GraphLookup
GraphLookup<TResult, TFrom, TConnectFrom, TConnectTo, TStartWith, TAs, TNewResult>(IAggregateFluent<TResult>, IMongoCollection<TFrom>, FieldDefinition<TFrom, TConnectFrom>, FieldDefinition<TFrom, TConnectTo>, AggregateExpressionDefinition<TResult, TStartWith>, FieldDefinition<TNewResult, TAs>, AggregateGraphLookupOptions<TFrom, TFrom, TNewResult>)
Appends a $graphLookup stage to the pipeline.
public static IAggregateFluent<TNewResult> GraphLookup<TResult, TFrom, TConnectFrom, TConnectTo, TStartWith, TAs, TNewResult>(this IAggregateFluent<TResult> aggregate, IMongoCollection<TFrom> from, FieldDefinition<TFrom, TConnectFrom> connectFromField, FieldDefinition<TFrom, TConnectTo> connectToField, AggregateExpressionDefinition<TResult, TStartWith> startWith, FieldDefinition<TNewResult, TAs> @as, AggregateGraphLookupOptions<TFrom, TFrom, TNewResult> options = null) where TAs : IEnumerable<TFrom>
Parameters
aggregateIAggregateFluent<TResult>The aggregate.
fromIMongoCollection<TFrom>The from collection.
connectFromFieldFieldDefinition<TFrom, TConnectFrom>The connect from field.
connectToFieldFieldDefinition<TFrom, TConnectTo>The connect to field.
startWithAggregateExpressionDefinition<TResult, TStartWith>The start with value.
asFieldDefinition<TNewResult, TAs>The as field.
optionsAggregateGraphLookupOptions<TFrom, TFrom, TNewResult>The options.
Returns
- IAggregateFluent<TNewResult>
The fluent aggregate interface.
Type Parameters
TResultThe type of the result.
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.
TNewResultThe type of the new result (must be same as TResult with an additional as field).
GraphLookup<TResult, TFrom>(IAggregateFluent<TResult>, IMongoCollection<TFrom>, FieldDefinition<TFrom, BsonValue>, FieldDefinition<TFrom, BsonValue>, AggregateExpressionDefinition<TResult, BsonValue>, FieldDefinition<BsonDocument, IEnumerable<BsonDocument>>, FieldDefinition<BsonDocument, int>)
Appends a $graphLookup stage to the pipeline.
public static IAggregateFluent<BsonDocument> GraphLookup<TResult, TFrom>(this IAggregateFluent<TResult> aggregate, IMongoCollection<TFrom> from, FieldDefinition<TFrom, BsonValue> connectFromField, FieldDefinition<TFrom, BsonValue> connectToField, AggregateExpressionDefinition<TResult, BsonValue> startWith, FieldDefinition<BsonDocument, IEnumerable<BsonDocument>> @as, FieldDefinition<BsonDocument, int> depthField = null)
Parameters
aggregateIAggregateFluent<TResult>The aggregate.
fromIMongoCollection<TFrom>The from collection.
connectFromFieldFieldDefinition<TFrom, BsonValue>The connect from field.
connectToFieldFieldDefinition<TFrom, BsonValue>The connect to field.
startWithAggregateExpressionDefinition<TResult, BsonValue>The start with value.
asFieldDefinition<BsonDocument, IEnumerable<BsonDocument>>The as field.
depthFieldFieldDefinition<BsonDocument, int>The depth field.
Returns
- IAggregateFluent<BsonDocument>
The fluent aggregate interface.
Type Parameters
TResultThe type of the result.
TFromThe type of the from documents.
GraphLookup<TResult, TFrom, TConnectFrom, TConnectTo, TStartWith, TAs, TNewResult>(IAggregateFluent<TResult>, IMongoCollection<TFrom>, Expression<Func<TFrom, TConnectFrom>>, Expression<Func<TFrom, TConnectTo>>, Expression<Func<TResult, TStartWith>>, Expression<Func<TNewResult, TAs>>, AggregateGraphLookupOptions<TFrom, TFrom, TNewResult>)
Appends a $graphLookup stage to the pipeline.
public static IAggregateFluent<TNewResult> GraphLookup<TResult, TFrom, TConnectFrom, TConnectTo, TStartWith, TAs, TNewResult>(this IAggregateFluent<TResult> aggregate, IMongoCollection<TFrom> from, Expression<Func<TFrom, TConnectFrom>> connectFromField, Expression<Func<TFrom, TConnectTo>> connectToField, Expression<Func<TResult, TStartWith>> startWith, Expression<Func<TNewResult, TAs>> @as, AggregateGraphLookupOptions<TFrom, TFrom, TNewResult> options = null) where TAs : IEnumerable<TFrom>
Parameters
aggregateIAggregateFluent<TResult>The aggregate.
fromIMongoCollection<TFrom>The from collection.
connectFromFieldExpression<Func<TFrom, TConnectFrom>>The connect from field.
connectToFieldExpression<Func<TFrom, TConnectTo>>The connect to field.
startWithExpression<Func<TResult, TStartWith>>The start with value.
asExpression<Func<TNewResult, TAs>>The as field.
optionsAggregateGraphLookupOptions<TFrom, TFrom, TNewResult>The options.
Returns
- IAggregateFluent<TNewResult>
The fluent aggregate interface.
Type Parameters
TResultThe type of the result.
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.
TNewResultThe type of the new result (must be same as TResult with an additional as field).
GraphLookup<TResult, TFrom, TConnectFrom, TConnectTo, TStartWith, TAsElement, TAs, TNewResult>(IAggregateFluent<TResult>, IMongoCollection<TFrom>, Expression<Func<TFrom, TConnectFrom>>, Expression<Func<TFrom, TConnectTo>>, Expression<Func<TResult, TStartWith>>, Expression<Func<TNewResult, TAs>>, Expression<Func<TAsElement, int>>, AggregateGraphLookupOptions<TFrom, TAsElement, TNewResult>)
Appends a $graphLookup stage to the pipeline.
public static IAggregateFluent<TNewResult> GraphLookup<TResult, TFrom, TConnectFrom, TConnectTo, TStartWith, TAsElement, TAs, TNewResult>(this IAggregateFluent<TResult> aggregate, IMongoCollection<TFrom> from, Expression<Func<TFrom, TConnectFrom>> connectFromField, Expression<Func<TFrom, TConnectTo>> connectToField, Expression<Func<TResult, TStartWith>> startWith, Expression<Func<TNewResult, TAs>> @as, Expression<Func<TAsElement, int>> depthField, AggregateGraphLookupOptions<TFrom, TAsElement, TNewResult> options = null) where TAs : IEnumerable<TAsElement>
Parameters
aggregateIAggregateFluent<TResult>The aggregate.
fromIMongoCollection<TFrom>The from collection.
connectFromFieldExpression<Func<TFrom, TConnectFrom>>The connect from field.
connectToFieldExpression<Func<TFrom, TConnectTo>>The connect to field.
startWithExpression<Func<TResult, TStartWith>>The start with value.
asExpression<Func<TNewResult, TAs>>The as field.
depthFieldExpression<Func<TAsElement, int>>The depth field.
optionsAggregateGraphLookupOptions<TFrom, TAsElement, TNewResult>The options.
Returns
- IAggregateFluent<TNewResult>
The fluent aggregate interface.
Type Parameters
TResultThe type of the result.
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.
TNewResultThe type of the new result (must be same as TResult with an additional as field).