Table of Contents

Method Select

Namespace
MongoDB.Driver.Linq
Assembly
MongoDB.Driver.dll

Select<TSource, TResult>(IMongoQueryable<TSource>, Expression<Func<TSource, TResult>>)

Projects each element of a sequence into a new form by incorporating the element's index.

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

Parameters

source IMongoQueryable<TSource>

A sequence of values to project.

selector Expression<Func<TSource, TResult>>

A projection function to apply to each element.

Returns

IMongoQueryable<TResult>

An IMongoQueryable<T> whose elements are the result of invoking a projection function on each element of source.

Type Parameters

TSource

The type of the elements of source.

TResult

The type of the value returned by the function represented by selector.