IAggregateFluentExtensionsGraphLookupTResult, TFrom, TConnectFrom, TConnectTo, TStartWith, TAsElement, TAs, TNewResult Method (IAggregateFluentTResult, IMongoCollectionTFrom, ExpressionFuncTFrom, TConnectFrom, ExpressionFuncTFrom, TConnectTo, ExpressionFuncTResult, TStartWith, ExpressionFuncTNewResult, TAs, ExpressionFuncTAsElement, Int32, AggregateGraphLookupOptionsTFrom, TAsElement, TNewResult) |
Appends a $graphLookup stage to the pipeline.
Namespace:
MongoDB.Driver
Assembly:
MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.16.0+eeafbea0921243a5868b81984e1083a07c1f75bc
Syntax 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 : Object, IEnumerable<TAsElement>
<ExtensionAttribute>
Public Shared Function GraphLookup(Of TResult, TFrom, TConnectFrom, TConnectTo, TStartWith, TAsElement, TAs As {Object, IEnumerable(Of TAsElement)}, TNewResult) (
aggregate As IAggregateFluent(Of TResult),
from As IMongoCollection(Of TFrom),
connectFromField As Expression(Of Func(Of TFrom, TConnectFrom)),
connectToField As Expression(Of Func(Of TFrom, TConnectTo)),
startWith As Expression(Of Func(Of TResult, TStartWith)),
as As Expression(Of Func(Of TNewResult, TAs)),
depthField As Expression(Of Func(Of TAsElement, Integer)),
Optional options As AggregateGraphLookupOptions(Of TFrom, TAsElement, TNewResult) = Nothing
) As IAggregateFluent(Of TNewResult)
[<ExtensionAttribute>]
static member GraphLookup :
aggregate : IAggregateFluent<'TResult> *
from : IMongoCollection<'TFrom> *
connectFromField : Expression<Func<'TFrom, 'TConnectFrom>> *
connectToField : Expression<Func<'TFrom, 'TConnectTo>> *
startWith : Expression<Func<'TResult, 'TStartWith>> *
as : Expression<Func<'TNewResult, 'TAs>> *
depthField : Expression<Func<'TAsElement, int>> *
?options : AggregateGraphLookupOptions<'TFrom, 'TAsElement, 'TNewResult>
(* Defaults:
let _options = defaultArg options null
*)
-> IAggregateFluent<'TNewResult> when 'TAs : Object and IEnumerable<'TAsElement>
Parameters
- aggregate
- Type: MongoDB.DriverIAggregateFluentTResult
The aggregate. - from
- Type: MongoDB.DriverIMongoCollectionTFrom
The from collection. - connectFromField
- Type: System.Linq.ExpressionsExpressionFuncTFrom, TConnectFrom
The connect from field. - connectToField
- Type: System.Linq.ExpressionsExpressionFuncTFrom, TConnectTo
The connect to field. - startWith
- Type: System.Linq.ExpressionsExpressionFuncTResult, TStartWith
The start with value. - as
- Type: System.Linq.ExpressionsExpressionFuncTNewResult, TAs
The as field. - depthField
- Type: System.Linq.ExpressionsExpressionFuncTAsElement, Int32
The depth field. - options (Optional)
- Type: MongoDB.DriverAggregateGraphLookupOptionsTFrom, TAsElement, TNewResult
The options.
Type Parameters
- TResult
- The type of the result.
- 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.
- TNewResult
- The type of the new result (must be same as TResult with an additional as field).
Return Value
Type:
IAggregateFluentTNewResultThe fluent aggregate interface.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IAggregateFluentTResult. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also