Method Distinct
Distinct<TValue>(DistinctArgs)
Returns the distinct values for a given field.
public IEnumerable<TValue> Distinct<TValue>(DistinctArgs args)
Parameters
args
DistinctArgsThe args.
Returns
- IEnumerable<TValue>
The distint values of the field.
Type Parameters
TValue
The type of the value.
Distinct(string)
Returns the distinct values for a given field.
public virtual IEnumerable<BsonValue> Distinct(string key)
Parameters
key
stringThe key of the field.
Returns
- IEnumerable<BsonValue>
The distint values of the field.
Distinct(string, IMongoQuery)
Returns the distinct values for a given field for documents that match a query.
public virtual IEnumerable<BsonValue> Distinct(string key, IMongoQuery query)
Parameters
key
stringThe key of the field.
query
IMongoQueryThe query (usually a QueryDocument or constructed using the Query builder).
Returns
- IEnumerable<BsonValue>
The distint values of the field.
Distinct<TValue>(string)
Returns the distinct values for a given field.
public virtual IEnumerable<TValue> Distinct<TValue>(string key)
Parameters
key
stringThe key of the field.
Returns
- IEnumerable<TValue>
The distint values of the field.
Type Parameters
TValue
The type of the value.
Distinct<TValue>(string, IMongoQuery)
Returns the distinct values for a given field for documents that match a query.
public virtual IEnumerable<TValue> Distinct<TValue>(string key, IMongoQuery query)
Parameters
key
stringThe key of the field.
query
IMongoQueryThe query (usually a QueryDocument or constructed using the Query builder).
Returns
- IEnumerable<TValue>
The distint values of the field.
Type Parameters
TValue
The type of the value.