MongoDB .NET Driver API Documentation

## IOrderedMongoQueryableT Methods |

The IOrderedMongoQueryableT generic type exposes the following members.

Methods

Name | Description | |
---|---|---|

GetEnumerator | Returns an enumerator that iterates through a collection. (Inherited from IEnumerable.) | |

GetExecutionModel |
Gets the execution model.
(Inherited from IMongoQueryable.) | |

ToCursor |
Executes the operation and returns a cursor to the results.
(Inherited from IAsyncCursorSourceTDocument.) | |

ToCursorAsync |
Executes the operation and returns a cursor to the results.
(Inherited from IAsyncCursorSourceTDocument.) |

Extension Methods

Name | Description | |
---|---|---|

AnyT |
Determines whether the cursor returned by a cursor source contains any documents.
(Defined by IAsyncCursorSourceExtensions.) | |

AnyAsyncT(CancellationToken) | Overloaded.
Determines whether a sequence contains any elements.
(Defined by MongoQueryable.) | |

AnyAsyncT(CancellationToken) | Overloaded.
Determines whether the cursor returned by a cursor source contains any documents.
(Defined by IAsyncCursorSourceExtensions.) | |

AnyAsyncT(ExpressionFuncT, Boolean, CancellationToken) | Overloaded.
Determines whether any element of a sequence satisfies a condition.
(Defined by MongoQueryable.) | |

AverageAsyncT(ExpressionFuncT, Decimal, CancellationToken) | Overloaded.
Computes the average of the sequence of Decimal values that is obtained
by invoking a projection function on each element of the input sequence.
(Defined by MongoQueryable.) | |

AverageAsyncT(ExpressionFuncT, NullableDecimal, CancellationToken) | Overloaded.
Computes the average of the sequence of NullableT values that is obtained
by invoking a projection function on each element of the input sequence.
(Defined by MongoQueryable.) | |

AverageAsyncT(ExpressionFuncT, Double, CancellationToken) | Overloaded.
Computes the average of the sequence of Double values that is obtained
by invoking a projection function on each element of the input sequence.
(Defined by MongoQueryable.) | |

AverageAsyncT(ExpressionFuncT, NullableDouble, CancellationToken) | Overloaded.
Computes the average of the sequence of NullableT values that is obtained
by invoking a projection function on each element of the input sequence.
(Defined by MongoQueryable.) | |

AverageAsyncT(ExpressionFuncT, Single, CancellationToken) | Overloaded.
Computes the average of the sequence of Single values that is obtained
by invoking a projection function on each element of the input sequence.
(Defined by MongoQueryable.) | |

AverageAsyncT(ExpressionFuncT, NullableSingle, CancellationToken) | Overloaded.
Computes the average of the sequence of NullableT values that is obtained
by invoking a projection function on each element of the input sequence.
(Defined by MongoQueryable.) | |

AverageAsyncT(ExpressionFuncT, Int32, CancellationToken) | Overloaded.
Computes the average of the sequence of Int32 values that is obtained
by invoking a projection function on each element of the input sequence.
(Defined by MongoQueryable.) | |

AverageAsyncT(ExpressionFuncT, NullableInt32, CancellationToken) | Overloaded. | |

AverageAsyncT(ExpressionFuncT, Int64, CancellationToken) | Overloaded.
Computes the average of the sequence of Int64 values that is obtained
by invoking a projection function on each element of the input sequence.
(Defined by MongoQueryable.) | |

AverageAsyncT(ExpressionFuncT, NullableInt64, CancellationToken) | Overloaded. | |

ContainsAllT |
Determines whether a sequence contains all of the specified values.
(Defined by LinqToMongo.) | |

ContainsAnyT |
Determines whether a sequence contains any of the specified values.
(Defined by LinqToMongo.) | |

CountAsyncT(CancellationToken) | Overloaded.
Returns the number of elements in a sequence.
(Defined by MongoQueryable.) | |

CountAsyncT(ExpressionFuncT, Boolean, CancellationToken) | Overloaded.
Returns the number of elements in the specified sequence that satisfies a condition.
(Defined by MongoQueryable.) | |

DistinctT |
Returns distinct elements from a sequence by using the default equality comparer to compare values.
(Defined by MongoQueryable.) | |

ExplainT | Overloaded.
Returns an explanation of how the query was executed (instead of the results).
(Defined by LinqExtensionMethods.) | |

ExplainT(Boolean) | Overloaded.
Returns an explanation of how the query was executed (instead of the results).
(Defined by LinqExtensionMethods.) | |

FirstT |
Returns the first document of a cursor returned by a cursor source.
(Defined by IAsyncCursorSourceExtensions.) | |

FirstAsyncT(CancellationToken) | Overloaded.
Returns the first element of a sequence.
(Defined by MongoQueryable.) | |

FirstAsyncT(CancellationToken) | Overloaded.
Returns the first document of a cursor returned by a cursor source.
(Defined by IAsyncCursorSourceExtensions.) | |

FirstAsyncT(ExpressionFuncT, Boolean, CancellationToken) | Overloaded.
Returns the first element of a sequence that satisfies a specified condition.
(Defined by MongoQueryable.) | |

FirstOrDefaultT |
Returns the first document of a cursor returned by a cursor source, or a default value if the cursor contains no documents.
(Defined by IAsyncCursorSourceExtensions.) | |

FirstOrDefaultAsyncT(CancellationToken) | Overloaded.
Returns the first element of a sequence, or a default value if the sequence contains no elements.
(Defined by MongoQueryable.) | |

FirstOrDefaultAsyncT(CancellationToken) | Overloaded.
Returns the first document of a cursor returned by a cursor source, or a default value if the cursor contains no documents.
(Defined by IAsyncCursorSourceExtensions.) | |

FirstOrDefaultAsyncT(ExpressionFuncT, Boolean, CancellationToken) | Overloaded.
Returns the first element of a sequence that satisfies a specified condition or a default value if no such element is found.
(Defined by MongoQueryable.) | |

ForEachAsyncT(ActionT, CancellationToken) | Overloaded.
Calls a delegate for each document returned by the cursor.
(Defined by IAsyncCursorSourceExtensions.) | |

ForEachAsyncT(ActionT, Int32, CancellationToken) | Overloaded.
Calls a delegate for each document returned by the cursor.
(Defined by IAsyncCursorSourceExtensions.) | |

ForEachAsyncT(FuncT, Task, CancellationToken) | Overloaded.
Calls a delegate for each document returned by the cursor.
(Defined by IAsyncCursorSourceExtensions.) | |

ForEachAsyncT(FuncT, Int32, Task, CancellationToken) | Overloaded.
Calls a delegate for each document returned by the cursor.
(Defined by IAsyncCursorSourceExtensions.) | |

GroupByT, TKey(ExpressionFuncT, TKey) | Overloaded.
Groups the elements of a sequence according to a specified key selector function.
(Defined by MongoQueryable.) | |

GroupByT, TKey, TResult(ExpressionFuncT, TKey, ExpressionFuncTKey, IEnumerableT, TResult) | Overloaded.
Groups the elements of a sequence according to a specified key selector function
and creates a result value from each group and its key.
(Defined by MongoQueryable.) | |

GroupJoinT, TInner, TKey, TResult(IEnumerableTInner, ExpressionFuncT, TKey, ExpressionFuncTInner, TKey, ExpressionFuncT, IEnumerableTInner, TResult) | Overloaded.
Correlates the elements of two sequences based on key equality and groups the results.
(Defined by MongoQueryable.) | |

GroupJoinT, TInner, TKey, TResult(IMongoCollectionTInner, ExpressionFuncT, TKey, ExpressionFuncTInner, TKey, ExpressionFuncT, IEnumerableTInner, TResult) | Overloaded.
Correlates the elements of two sequences based on key equality and groups the results.
(Defined by MongoQueryable.) | |

JoinT, TInner, TKey, TResult(IEnumerableTInner, ExpressionFuncT, TKey, ExpressionFuncTInner, TKey, ExpressionFuncT, TInner, TResult) | Overloaded.
Correlates the elements of two sequences based on matching keys.
(Defined by MongoQueryable.) | |

JoinT, TInner, TKey, TResult(IMongoCollectionTInner, ExpressionFuncT, TKey, ExpressionFuncTInner, TKey, ExpressionFuncT, TInner, TResult) | Overloaded.
Correlates the elements of two sequences based on matching keys.
(Defined by MongoQueryable.) | |

LongCountAsyncT(CancellationToken) | Overloaded.
Returns the number of elements in a sequence.
(Defined by MongoQueryable.) | |

LongCountAsyncT(ExpressionFuncT, Boolean, CancellationToken) | Overloaded.
Returns the number of elements in the specified sequence that satisfies a condition.
(Defined by MongoQueryable.) | |

MaxAsyncT(CancellationToken) | Overloaded.
Returns the maximum value in a generic IMongoQueryableT.
(Defined by MongoQueryable.) | |

MaxAsyncT, TResult(ExpressionFuncT, TResult, CancellationToken) | Overloaded.
Invokes a projection function on each element of a generic IMongoQueryableT and returns the maximum resulting value.
(Defined by MongoQueryable.) | |

MinAsyncT(CancellationToken) | Overloaded.
Returns the minimum value in a generic IMongoQueryableT.
(Defined by MongoQueryable.) | |

MinAsyncT, TResult(ExpressionFuncT, TResult, CancellationToken) | Overloaded.
Invokes a projection function on each element of a generic IMongoQueryableT and returns the minimum resulting value.
(Defined by MongoQueryable.) | |

OfTypeTResult |
Filters the elements of an IMongoQueryable based on a specified type.
(Defined by MongoQueryable.) | |

OrderByT, TKey |
Sorts the elements of a sequence in ascending order according to a key.
(Defined by MongoQueryable.) | |

OrderByDescendingT, TKey |
Sorts the elements of a sequence in descending order according to a key.
(Defined by MongoQueryable.) | |

SampleT |
Returns a sample of the elements in the source.
(Defined by MongoQueryable.) | |

SelectT, TResult |
Projects each element of a sequence into a new form by incorporating the
element's index.
(Defined by MongoQueryable.) | |

SelectManyT, TResult(ExpressionFuncT, IEnumerableTResult) | Overloaded.
Projects each element of a sequence to an IEnumerableT and combines the resulting sequences into one sequence.
(Defined by MongoQueryable.) | |

SelectManyT, TCollection, TResult(ExpressionFuncT, IEnumerableTCollection, ExpressionFuncT, TCollection, TResult) | Overloaded.
Projects each element of a sequence to an IEnumerableT and
invokes a result selector function on each element therein. The resulting values from
each intermediate sequence are combined into a single, one-dimensional sequence and returned.
(Defined by MongoQueryable.) | |

SingleT |
Returns the only document of a cursor returned by a cursor source. This method throws an exception if the cursor does not contain exactly one document.
(Defined by IAsyncCursorSourceExtensions.) | |

SingleAsyncT(CancellationToken) | Overloaded.
Returns the only element of a sequence, and throws an exception if there is not exactly one element in the sequence.
(Defined by MongoQueryable.) | |

SingleAsyncT(CancellationToken) | Overloaded.
Returns the only document of a cursor returned by a cursor source. This method throws an exception if the cursor does not contain exactly one document.
(Defined by IAsyncCursorSourceExtensions.) | |

SingleAsyncT(ExpressionFuncT, Boolean, CancellationToken) | Overloaded.
Returns the only element of a sequence that satisfies a specified condition, and throws an exception if more than one such element exists.
(Defined by MongoQueryable.) | |

SingleOrDefaultT |
Returns the only document of a cursor returned by a cursor source, or a default value if the cursor contains no documents.
This method throws an exception if the cursor contains more than one document.
(Defined by IAsyncCursorSourceExtensions.) | |

SingleOrDefaultAsyncT(CancellationToken) | Overloaded.
Returns the only element of a sequence, or a default value if the sequence is empty; this method throws an exception if there is more than one element in the sequence.
(Defined by MongoQueryable.) | |

SingleOrDefaultAsyncT(CancellationToken) | Overloaded.
Returns the only document of a cursor returned by a cursor source, or a default value if the cursor contains no documents.
This method throws an exception if the cursor contains more than one document.
(Defined by IAsyncCursorSourceExtensions.) | |

SingleOrDefaultAsyncT(ExpressionFuncT, Boolean, CancellationToken) | Overloaded.
Returns the only element of a sequence that satisfies a specified condition or a default value if no such element exists; this method throws an exception if more than one element satisfies the condition.
(Defined by MongoQueryable.) | |

SkipT |
Bypasses a specified number of elements in a sequence and then returns the
remaining elements.
(Defined by MongoQueryable.) | |

StandardDeviationPopulationT(ExpressionFuncT, Int32) | Overloaded.
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoQueryable.) | |

StandardDeviationPopulationT(ExpressionFuncT, NullableInt32) | Overloaded.
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoQueryable.) | |

StandardDeviationPopulationT(ExpressionFuncT, Int64) | Overloaded.
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoQueryable.) | |

StandardDeviationPopulationT(ExpressionFuncT, NullableInt64) | Overloaded. | |

StandardDeviationPopulationT(ExpressionFuncT, Single) | Overloaded. | |

StandardDeviationPopulationT(ExpressionFuncT, NullableSingle) | Overloaded. | |

StandardDeviationPopulationT(ExpressionFuncT, Double) | Overloaded. | |

StandardDeviationPopulationT(ExpressionFuncT, NullableDouble) | Overloaded. | |

StandardDeviationPopulationT(ExpressionFuncT, Decimal) | Overloaded. | |

StandardDeviationPopulationT(ExpressionFuncT, NullableDecimal) | Overloaded. | |

StandardDeviationPopulationT(FuncT, Int32) | Overloaded. | |

StandardDeviationPopulationT(FuncT, NullableInt32) | Overloaded. | |

StandardDeviationPopulationT(FuncT, Int64) | Overloaded. | |

StandardDeviationPopulationT(FuncT, NullableInt64) | Overloaded. | |

StandardDeviationPopulationT(FuncT, Single) | Overloaded. | |

StandardDeviationPopulationT(FuncT, NullableSingle) | Overloaded. | |

StandardDeviationPopulationT(FuncT, Double) | Overloaded. | |

StandardDeviationPopulationT(FuncT, NullableDouble) | Overloaded. | |

StandardDeviationPopulationT(FuncT, Decimal) | Overloaded. | |

StandardDeviationPopulationT(FuncT, NullableDecimal) | Overloaded. | |

StandardDeviationPopulationAsyncT(ExpressionFuncT, Int32, CancellationToken) | Overloaded. | |

StandardDeviationPopulationAsyncT(ExpressionFuncT, NullableInt32, CancellationToken) | Overloaded. | |

StandardDeviationPopulationAsyncT(ExpressionFuncT, Int64, CancellationToken) | Overloaded. | |

StandardDeviationPopulationAsyncT(ExpressionFuncT, NullableInt64, CancellationToken) | Overloaded. | |

StandardDeviationPopulationAsyncT(ExpressionFuncT, Single, CancellationToken) | Overloaded. | |

StandardDeviationPopulationAsyncT(ExpressionFuncT, NullableSingle, CancellationToken) | Overloaded. | |

StandardDeviationPopulationAsyncT(ExpressionFuncT, Double, CancellationToken) | Overloaded. | |

StandardDeviationPopulationAsyncT(ExpressionFuncT, NullableDouble, CancellationToken) | Overloaded. | |

StandardDeviationPopulationAsyncT(ExpressionFuncT, Decimal, CancellationToken) | Overloaded. | |

StandardDeviationPopulationAsyncT(ExpressionFuncT, NullableDecimal, CancellationToken) | Overloaded. | |

StandardDeviationSampleT(ExpressionFuncT, Int32) | Overloaded.
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoQueryable.) | |

StandardDeviationSampleT(ExpressionFuncT, NullableInt32) | Overloaded.
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoQueryable.) | |

StandardDeviationSampleT(ExpressionFuncT, Int64) | Overloaded.
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoQueryable.) | |

StandardDeviationSampleT(ExpressionFuncT, NullableInt64) | Overloaded. | |

StandardDeviationSampleT(ExpressionFuncT, Single) | Overloaded. | |

StandardDeviationSampleT(ExpressionFuncT, NullableSingle) | Overloaded. | |

StandardDeviationSampleT(ExpressionFuncT, Double) | Overloaded. | |

StandardDeviationSampleT(ExpressionFuncT, NullableDouble) | Overloaded. | |

StandardDeviationSampleT(ExpressionFuncT, Decimal) | Overloaded. | |

StandardDeviationSampleT(ExpressionFuncT, NullableDecimal) | Overloaded. | |

StandardDeviationSampleT(FuncT, Int32) | Overloaded. | |

StandardDeviationSampleT(FuncT, NullableInt32) | Overloaded. | |

StandardDeviationSampleT(FuncT, Int64) | Overloaded. | |

StandardDeviationSampleT(FuncT, NullableInt64) | Overloaded. | |

StandardDeviationSampleT(FuncT, Single) | Overloaded. | |

StandardDeviationSampleT(FuncT, NullableSingle) | Overloaded. | |

StandardDeviationSampleT(FuncT, Double) | Overloaded. | |

StandardDeviationSampleT(FuncT, NullableDouble) | Overloaded. | |

StandardDeviationSampleT(FuncT, Decimal) | Overloaded. | |

StandardDeviationSampleT(FuncT, NullableDecimal) | Overloaded. | |

StandardDeviationSampleAsyncT(ExpressionFuncT, Int32, CancellationToken) | Overloaded. | |

StandardDeviationSampleAsyncT(ExpressionFuncT, NullableInt32, CancellationToken) | Overloaded. | |

StandardDeviationSampleAsyncT(ExpressionFuncT, Int64, CancellationToken) | Overloaded. | |

StandardDeviationSampleAsyncT(ExpressionFuncT, NullableInt64, CancellationToken) | Overloaded. | |

StandardDeviationSampleAsyncT(ExpressionFuncT, Single, CancellationToken) | Overloaded. | |

StandardDeviationSampleAsyncT(ExpressionFuncT, NullableSingle, CancellationToken) | Overloaded. | |

StandardDeviationSampleAsyncT(ExpressionFuncT, Double, CancellationToken) | Overloaded. | |

StandardDeviationSampleAsyncT(ExpressionFuncT, NullableDouble, CancellationToken) | Overloaded. | |

StandardDeviationSampleAsyncT(ExpressionFuncT, Decimal, CancellationToken) | Overloaded. | |

StandardDeviationSampleAsyncT(ExpressionFuncT, NullableDecimal, CancellationToken) | Overloaded. | |

SumAsyncT(ExpressionFuncT, Decimal, CancellationToken) | Overloaded.
Computes the sum of the sequence of Decimal values that is obtained
by invoking a projection function on each element of the input sequence.
(Defined by MongoQueryable.) | |

SumAsyncT(ExpressionFuncT, NullableDecimal, CancellationToken) | Overloaded.
Computes the sum of the sequence of NullableT values that is obtained
by invoking a projection function on each element of the input sequence.
(Defined by MongoQueryable.) | |

SumAsyncT(ExpressionFuncT, Double, CancellationToken) | Overloaded.
Computes the sum of the sequence of Double values that is obtained
by invoking a projection function on each element of the input sequence.
(Defined by MongoQueryable.) | |

SumAsyncT(ExpressionFuncT, NullableDouble, CancellationToken) | Overloaded.
Computes the sum of the sequence of NullableT values that is obtained
by invoking a projection function on each element of the input sequence.
(Defined by MongoQueryable.) | |

SumAsyncT(ExpressionFuncT, Single, CancellationToken) | Overloaded.
Computes the sum of the sequence of Single values that is obtained
by invoking a projection function on each element of the input sequence.
(Defined by MongoQueryable.) | |

SumAsyncT(ExpressionFuncT, NullableSingle, CancellationToken) | Overloaded.
Computes the sum of the sequence of NullableT values that is obtained
by invoking a projection function on each element of the input sequence.
(Defined by MongoQueryable.) | |

SumAsyncT(ExpressionFuncT, Int32, CancellationToken) | Overloaded.
Computes the sum of the sequence of Int32 values that is obtained
by invoking a projection function on each element of the input sequence.
(Defined by MongoQueryable.) | |

SumAsyncT(ExpressionFuncT, NullableInt32, CancellationToken) | Overloaded. | |

SumAsyncT(ExpressionFuncT, Int64, CancellationToken) | Overloaded.
Computes the sum of the sequence of Int64 values that is obtained
by invoking a projection function on each element of the input sequence.
(Defined by MongoQueryable.) | |

SumAsyncT(ExpressionFuncT, NullableInt64, CancellationToken) | Overloaded. | |

TakeT |
Returns a specified number of contiguous elements from the start of a sequence.
(Defined by MongoQueryable.) | |

ThenByTSource, TKey |
Performs a subsequent ordering of the elements in a sequence in ascending
order according to a key.
(Defined by MongoQueryable.) | |

ThenByDescendingTSource, TKey |
Performs a subsequent ordering of the elements in a sequence in descending
order according to a key.
(Defined by MongoQueryable.) | |

ToEnumerableT |
Wraps a cursor source in an IEnumerable. Each time GetEnumerator is called a new cursor is fetched from the cursor source.
(Defined by IAsyncCursorSourceExtensions.) | |

ToListT |
Returns a list containing all the documents returned by the cursor returned by a cursor source.
(Defined by IAsyncCursorSourceExtensions.) | |

ToListAsyncT |
Returns a list containing all the documents returned by the cursor returned by a cursor source.
(Defined by IAsyncCursorSourceExtensions.) | |

WhereT |
Filters a sequence of values based on a predicate.
(Defined by MongoQueryable.) | |

WithIndexT(BsonDocument) | Overloaded.
Sets an index hint on the query that's being built.
(Defined by LinqToMongo.) | |

WithIndexT(String) | Overloaded.
Sets an index hint on the query that's being built.
(Defined by LinqToMongo.) |

See Also