Method Lookup
| MongoDB CSharp Driver API Reference (original) (raw)
Namespace
Assembly
MongoDB.Driver.dll
Lookup<TForeignDocument, TNewResult>(string, FieldDefinition, FieldDefinition, FieldDefinition, AggregateLookupOptions<TForeignDocument, TNewResult>)
Appends a lookup stage to the pipeline.
IAggregateFluent<TNewResult> Lookup<TForeignDocument, TNewResult>(string foreignCollectionName, FieldDefinition<TResult> localField, FieldDefinition<TForeignDocument> foreignField, FieldDefinition<TNewResult> @as, AggregateLookupOptions<TForeignDocument, TNewResult> options = null)Parameters
foreignCollectionName string
Name of the other collection.
localField FieldDefinition
The local field.
foreignField FieldDefinition
The foreign field.
The field in TNewResult to place the foreign results.
options AggregateLookupOptions<TForeignDocument, TNewResult>
The options.
Returns
The fluent aggregate interface.
Type Parameters
TForeignDocument
The type of the foreign document.
TNewResult
The type of the new result.
Lookup<TForeignDocument, TAsElement, TAs, TNewResult>(IMongoCollection, BsonDocument, PipelineDefinition<TForeignDocument, TAsElement>, FieldDefinition<TNewResult, TAs>, AggregateLookupOptions<TForeignDocument, TNewResult>)
Appends a lookup stage to the pipeline.
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 : IEnumerable<TAsElement>Parameters
foreignCollection IMongoCollection
The foreign collection.
let BsonDocument
The "let" definition.
lookupPipeline PipelineDefinition<TForeignDocument, TAsElement>
The lookup pipeline.
as FieldDefinition<TNewResult, TAs>
The as field in TNewResult in which to place the results of the lookup pipeline.
options AggregateLookupOptions<TForeignDocument, TNewResult>
The options.
Returns
The fluent aggregate interface.
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.