Method Lookup
Lookup<TForeignDocument, TNewResult>(string, FieldDefinition<TResult>, FieldDefinition<TForeignDocument>, FieldDefinition<TNewResult>, 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
- foreignCollectionNamestring
- Name of the other collection. 
- localFieldFieldDefinition<TResult>
- The local field. 
- foreignFieldFieldDefinition<TForeignDocument>
- The foreign field. 
- asFieldDefinition<TNewResult>
- The field in - TNewResultto place the foreign results.
- optionsAggregateLookupOptions<TForeignDocument, TNewResult>
- The options. 
Returns
- IAggregateFluent<TNewResult>
- 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<TForeignDocument>, 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
- foreignCollectionIMongoCollection<TForeignDocument>
- The foreign collection. 
- letBsonDocument
- The "let" definition. 
- lookupPipelinePipelineDefinition<TForeignDocument, TAsElement>
- The lookup pipeline. 
- asFieldDefinition<TNewResult, TAs>
- The as field in - TNewResultin which to place the results of the lookup pipeline.
- optionsAggregateLookupOptions<TForeignDocument, TNewResult>
- The options. 
Returns
- IAggregateFluent<TNewResult>
- 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.