CqlQueryExtensions.OrderBy<TSource, TKey> Method |
Sorts the elements, which are returned from CqlQuery, in ascending order according to a key.
Namespace:
Cassandra.Data.Linq
Assembly:
Cassandra (in Cassandra.dll) Version: 3.9.0
Syntax public static CqlQuery<TSource> OrderBy<TSource, TKey>(
this CqlQuery<TSource> source,
Expression<Func<TSource, TKey>> keySelector
)
Parameters
- source
- Type: Cassandra.Data.Linq.CqlQuery<TSource>
A sequence of values to order, returned from CqlQuery<TSource>. - keySelector
- Type: System.Linq.Expressions.Expression<Func<TSource, TKey>>
A function to extract a key from an element.
Type Parameters
- TSource
- The type of the elements of source.
- TKey
- The type of the key returned by keySelector.
Return Value
Type:
CqlQuery<TSource>a CqlQuery<TSource> which after execution returns an IEnumerable<TSource> sorted in ascending manner according to a key.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
CqlQuery<TSource>. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also