Table of Contents

Method Distinct

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

Distinct<TSource>(IMongoQueryable<TSource>)

Returns distinct elements from a sequence by using the default equality comparer to compare values.

public static IMongoQueryable<TSource> Distinct<TSource>(this IMongoQueryable<TSource> source)

Parameters

source IMongoQueryable<TSource>

The IMongoQueryable<T> to remove duplicates from.

Returns

IMongoQueryable<TSource>

An IMongoQueryable<T> that contains distinct elements from source.

Type Parameters

TSource

The type of the elements of source.