Class SortingExtensions
排序条件转换扩展
Inheritance
System.Object
SortingExtensions
Namespace: DapperDal.Expressions
Assembly: DapperDal.dll
Syntax
public static class SortingExtensions : object
Methods
| Improve this Doc View SourceToSortable(Object)
匿名排序对象转换为排序组的扩展方法
Declaration
public static IList<ISort> ToSortable(this object sort)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sort | 匿名排序对象,如new { CarId = SortDirection.Descending } |
Returns
| Type | Description |
|---|---|
| IList<ISort> | 排序组 |
ToSortable<T>(Expression<Func<T, Object>>[], SortDirection)
排序条件表达式转换为排序组的扩展方法
Declaration
public static IList<ISort> ToSortable<T>(this Expression<Func<T, object>>[] sortingExpression, SortDirection ascending = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Expression<Func<T, System.Object>>[] | sortingExpression | 排序条件表达式 |
| SortDirection | ascending | 排序方向 |
Returns
| Type | Description |
|---|---|
| IList<ISort> | 排序组 |
Type Parameters
| Name | Description |
|---|---|
| T | 实体类型 |