ServiceQueryHelper.ApplySort method (1 of 3)
namespace: Serenity.Services assembly: Serenity.Net.Services
Applies sort order to the query
public static SqlQuery ApplySort(this SqlQuery query, SortBy sortBy)
| parameter | description |
|---|---|
| query | Query |
| sortBy | Sort order |
See Also
- class SqlQuery
- class SortBy
- class ServiceQueryHelper
ServiceQueryHelper.ApplySort method (2 of 3)
namespace: Serenity.Services assembly: Serenity.Net.Services
Applies sort orders to the query
public static SqlQuery ApplySort(this SqlQuery query, IList<SortBy> sortByList,
params SortBy[] defaultSortBy)
| parameter | description |
|---|---|
| query | Query |
| sortByList | Sort orders |
| defaultSortBy | The default sort order |
See Also
- class SqlQuery
- class SortBy
- class ServiceQueryHelper
ServiceQueryHelper.ApplySort method (3 of 3)
namespace: Serenity.Services assembly: Serenity.Net.Services
Applies the sort order to the query
public static SqlQuery ApplySort(this SqlQuery query, string sort, bool descending)
| parameter | description |
|---|---|
| query | Query |
| sort | Sort field, ignored if null, empty or not a usable field (e.g. a field that is selected in the query or available in the row) |
| descending | Descending flag |
Exceptions
| exception | condition |
|---|---|
| ArgumentNullException | query is null |
See Also
- class SqlQuery
- class ServiceQueryHelper