Method Select
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
sourceIMongoQueryable<TSource>A sequence of values to project.
selectorExpression<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
TSourceThe type of the elements of
source.TResultThe type of the value returned by the function represented by selector.