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
source
IMongoQueryable<TSource>The sequence to return elements from.
count
intThe 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
TSource
The 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
source
IMongoQueryable<TSource>The sequence to return elements from.
count
longThe 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
TSource
The type of the elements of
source
.