Sorts the entities according to a criterion.
Assembly: Epic.Query.Object
Declaration Syntax
C# |
public static IOrderedSearch<TEntity, TIdentity> OrderBy<TEntity, TIdentity>( this ISearch<TEntity, TIdentity> search, OrderCriterion<TEntity> criterion ) where TEntity : class where TIdentity : Object, IEquatable<TIdentity>
Generic Template Parameters
- TEntity
- The type of the entities searched by search.
- TIdentity
- The type of the identities of the entities searched by search.
Parameters
- search (ISearch<(Of <(<'TEntity, TIdentity>)>)>)
- A search for TEntity.
- criterion (OrderCriterion<(Of <(<'TEntity>)>)>)
- Order criterion.
Return Value
An IOrderedSearch<(Of <(<'TEntity, TIdentity>)>)> whose elements are
sorted according to the criterion provided.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type ISearch<(Of <(<'TEntity, TIdentity>)>)>. When you use instance method syntax to call this method, omit the first parameter.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | search or
criterion is nullNothingnullptr. |