MongoQueryable.SelectMany(TSource, TResult) Method (IMongoQueryable(TSource), Expression(Func(TSource, IEnumerable(TResult)))) (original) (raw)

MongoQueryableSelectManyTSource, TResult Method (IMongoQueryableTSource, ExpressionFuncTSource, IEnumerableTResult)

Projects each element of a sequence to an IEnumerableT and combines the resulting sequences into one sequence.

Namespace: MongoDB.Driver.Linq
Assembly: MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.10.0+569905ff5e778c38ea19d9d0392496a83e1704ed

Syntax

public static IMongoQueryable SelectMany<TSource, TResult>( this IMongoQueryable source, Expression<Func<TSource, IEnumerable>> selector )

Public Shared Function SelectMany(Of TSource, TResult) ( source As IMongoQueryable(Of TSource), selector As Expression(Of Func(Of TSource, IEnumerable(Of TResult))) ) As IMongoQueryable(Of TResult)

[] static member SelectMany : source : IMongoQueryable<'TSource> * selector : Expression<Func<'TSource, IEnumerable<'TResult>>> -> IMongoQueryable<'TResult>

Parameters

source

Type: MongoDB.Driver.LinqIMongoQueryableTSource
A sequence of values to project.

selector

Type: System.Linq.ExpressionsExpressionFuncTSource, IEnumerableTResult
A projection function to apply to each element.

Type Parameters

TSource

The type of the elements of source.

TResult

The type of the elements of the sequence returned by the function represented by selector.

Return Value

Type: IMongoQueryableTResult
An IMongoQueryableT whose elements are the result of invoking a one-to-many projection function on each element of the input sequence.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IMongoQueryableTSource. 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

Reference