Class Orderer<TOrder, TOrderProperty>
Implementation of IOrderer.
Implements
IOrderer<TOrder>
Inherited Members
Namespace: Acoustics.Shared
Assembly: Acoustics.Shared.dll
Syntax
public class Orderer<TOrder, TOrderProperty> : IOrderer<TOrder>
Type Parameters
Name | Description |
---|---|
TOrder | Type to order. |
TOrderProperty | Type from property to order by. |
Constructors
| Improve this Doc View SourceOrderer(Expression<Func<TOrder, TOrderProperty>>)
Initializes a new instance of the Orderer<TOrder, TOrderProperty> class. Orders by ascending.
Declaration
public Orderer(Expression<Func<TOrder, TOrderProperty>> orderExpr)
Parameters
Type | Name | Description |
---|---|---|
Expression<Func<TOrder, TOrderProperty>> | orderExpr | The order expr. |
Orderer(Expression<Func<TOrder, TOrderProperty>>, SortDirection)
Initializes a new instance of the Orderer<TOrder, TOrderProperty> class.
Declaration
public Orderer(Expression<Func<TOrder, TOrderProperty>> orderExpr, SortDirection sortDirection)
Parameters
Type | Name | Description |
---|---|---|
Expression<Func<TOrder, TOrderProperty>> | orderExpr | The order expr. |
SortDirection | sortDirection | The sort Direction. |
Methods
| Improve this Doc View SourceApplyOrderBy(IQueryable<TOrder>)
Apply order by to IQueryable.
Declaration
public IOrderedQueryable<TOrder> ApplyOrderBy(IQueryable<TOrder> source)
Parameters
Type | Name | Description |
---|---|---|
IQueryable<TOrder> | source | The source. |
Returns
Type | Description |
---|---|
IOrderedQueryable<TOrder> | Ordered Queryable. |
ApplyThenBy(IOrderedQueryable<TOrder>)
Apply order then by to IQueryable.
Declaration
public IOrderedQueryable<TOrder> ApplyThenBy(IOrderedQueryable<TOrder> source)
Parameters
Type | Name | Description |
---|---|---|
IOrderedQueryable<TOrder> | source | The source. |
Returns
Type | Description |
---|---|
IOrderedQueryable<TOrder> | Ordered Queryable. |