PipelineStageDefinitionBuilderLookupTInput, TForeignDocument, TAsElement, TAs, TOutput Method (IMongoCollectionTForeignDocument, BsonDocument, PipelineDefinitionTForeignDocument, TAsElement, ExpressionFuncTOutput, TAs, AggregateLookupOptionsTForeignDocument, TOutput) |
Creates a $lookup stage.
Namespace:
MongoDB.Driver
Assembly:
MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.11.0+cb27a82ea70620ad1acad8058809be8302ae4f2a
Syntax public static PipelineStageDefinition<TInput, TOutput> Lookup<TInput, TForeignDocument, TAsElement, TAs, TOutput>(
IMongoCollection<TForeignDocument> foreignCollection,
BsonDocument let,
PipelineDefinition<TForeignDocument, TAsElement> lookupPipeline,
Expression<Func<TOutput, TAs>> as,
AggregateLookupOptions<TForeignDocument, TOutput> options = null
)
where TAs : Object, IEnumerable<TAsElement>
Public Shared Function Lookup(Of TInput, TForeignDocument, TAsElement, TAs As {Object, IEnumerable(Of TAsElement)}, TOutput) (
foreignCollection As IMongoCollection(Of TForeignDocument),
let As BsonDocument,
lookupPipeline As PipelineDefinition(Of TForeignDocument, TAsElement),
as As Expression(Of Func(Of TOutput, TAs)),
Optional options As AggregateLookupOptions(Of TForeignDocument, TOutput) = Nothing
) As PipelineStageDefinition(Of TInput, TOutput)
static member Lookup :
foreignCollection : IMongoCollection<'TForeignDocument> *
let : BsonDocument *
lookupPipeline : PipelineDefinition<'TForeignDocument, 'TAsElement> *
as : Expression<Func<'TOutput, 'TAs>> *
?options : AggregateLookupOptions<'TForeignDocument, 'TOutput>
(* Defaults:
let _options = defaultArg options null
*)
-> PipelineStageDefinition<'TInput, 'TOutput> when 'TAs : Object and IEnumerable<'TAsElement>
Parameters
- foreignCollection
- Type: MongoDB.DriverIMongoCollectionTForeignDocument
The foreign collection. - let
- Type: MongoDB.BsonBsonDocument
The "let" definition. - lookupPipeline
- Type: MongoDB.DriverPipelineDefinitionTForeignDocument, TAsElement
The lookup pipeline. - as
- Type: System.Linq.ExpressionsExpressionFuncTOutput, TAs
The as field in TOutput in which to place the results of the lookup pipeline. - options (Optional)
- Type: MongoDB.DriverAggregateLookupOptionsTForeignDocument, TOutput
The options.
Type Parameters
- TInput
- The type of the input documents.
- TForeignDocument
- The type of the foreign collection documents.
- TAsElement
- The type of the as field elements.
- TAs
- The type of the as field.
- TOutput
- The type of the output documents.
Return Value
Type:
PipelineStageDefinitionTInput,
TOutputThe stage.
See Also