Method Sample

| MongoDB CSharp Driver API Reference (original) (raw)

Namespace

MongoDB.Driver.Linq

Assembly

MongoDB.Driver.dll

Sample(IQueryable, long)

Returns a sample of the elements in the source.

public static IQueryable<TSource> Sample<TSource>(this IQueryable<TSource> source, long count)

Parameters

source IQueryable

An IQueryable to return a sample of.

count long

The number of elements in the sample.

Returns

IQueryable

A sample of the elements in the source.

Type Parameters

TSource

The type of the elements of source.