AggregateFluentBaseTResultLookupTForeignDocument, TAsElement, TAs, TNewResult Method (IMongoCollectionTForeignDocument, BsonDocument, PipelineDefinitionTForeignDocument, TAsElement, FieldDefinitionTNewResult, TAs, AggregateLookupOptionsTForeignDocument, TNewResult) |
Appends a lookup stage to the pipeline.
Namespace:
MongoDB.Driver
Assembly:
MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.20.0+ee01960089f28ea1b501690df5fc9f6318a70242
Syntax public virtual IAggregateFluent<TNewResult> Lookup<TForeignDocument, TAsElement, TAs, TNewResult>(
IMongoCollection<TForeignDocument> foreignCollection,
BsonDocument let,
PipelineDefinition<TForeignDocument, TAsElement> lookupPipeline,
FieldDefinition<TNewResult, TAs> as,
AggregateLookupOptions<TForeignDocument, TNewResult> options = null
)
where TAs : Object, IEnumerable<TAsElement>
Public Overridable Function Lookup(Of TForeignDocument, TAsElement, TAs As {Object, IEnumerable(Of TAsElement)}, TNewResult) (
foreignCollection As IMongoCollection(Of TForeignDocument),
let As BsonDocument,
lookupPipeline As PipelineDefinition(Of TForeignDocument, TAsElement),
as As FieldDefinition(Of TNewResult, TAs),
Optional options As AggregateLookupOptions(Of TForeignDocument, TNewResult) = Nothing
) As IAggregateFluent(Of TNewResult)
abstract Lookup :
foreignCollection : IMongoCollection<'TForeignDocument> *
let : BsonDocument *
lookupPipeline : PipelineDefinition<'TForeignDocument, 'TAsElement> *
as : FieldDefinition<'TNewResult, 'TAs> *
?options : AggregateLookupOptions<'TForeignDocument, 'TNewResult>
(* Defaults:
let _options = defaultArg options null
*)
-> IAggregateFluent<'TNewResult> when 'TAs : Object and IEnumerable<'TAsElement>
override Lookup :
foreignCollection : IMongoCollection<'TForeignDocument> *
let : BsonDocument *
lookupPipeline : PipelineDefinition<'TForeignDocument, 'TAsElement> *
as : FieldDefinition<'TNewResult, 'TAs> *
?options : AggregateLookupOptions<'TForeignDocument, 'TNewResult>
(* Defaults:
let _options = defaultArg options null
*)
-> IAggregateFluent<'TNewResult> 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: MongoDB.DriverFieldDefinitionTNewResult, TAs
The as field in TNewResult in which to place the results of the lookup pipeline. - options (Optional)
- Type: MongoDB.DriverAggregateLookupOptionsTForeignDocument, TNewResult
The options.
Type Parameters
- TForeignDocument
- The type of the foreign collection documents.
- TAsElement
- The type of the as field elements.
- TAs
- The type of the as field.
- TNewResult
- The type of the new result.
Return Value
Type:
IAggregateFluentTNewResultThe fluent aggregate interface.
Implements
IAggregateFluentTResultLookupTForeignDocument, TAsElement, TAs, TNewResult(IMongoCollectionTForeignDocument, BsonDocument, PipelineDefinitionTForeignDocument, TAsElement, FieldDefinitionTNewResult, TAs, AggregateLookupOptionsTForeignDocument, TNewResult)See Also