Method Take
Take<TSource>(IMongoQueryable<TSource>, int)
Returns a specified number of contiguous elements from the start of a sequence.
public static IMongoQueryable<TSource> Take<TSource>(this IMongoQueryable<TSource> source, int count)
Parameters
sourceIMongoQueryable<TSource>The sequence to return elements from.
countintThe number of elements to return.
Returns
- IMongoQueryable<TSource>
An IMongoQueryable<T> that contains the specified number of elements from the start of source.
Type Parameters
TSourceThe type of the elements of
source.
Take<TSource>(IMongoQueryable<TSource>, long)
Returns a specified number of contiguous elements from the start of a sequence.
public static IMongoQueryable<TSource> Take<TSource>(this IMongoQueryable<TSource> source, long count)
Parameters
sourceIMongoQueryable<TSource>The sequence to return elements from.
countlongThe number of elements to return.
Returns
- IMongoQueryable<TSource>
An IMongoQueryable<T> that contains the specified number of elements from the start of source.
Type Parameters
TSourceThe type of the elements of
source.