Class LinqExtensions
Inheritance
System.Object
LinqExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: WaCore.Crud.Utils
Assembly: WaCore.Crud.Utils.dll
Syntax
public static class LinqExtensions
Methods
| Improve this Doc View SourceOrderBySortString<T>(IQueryable<T>, String, SortFieldMapping<T>)
Sort an IQueryable by a sort string containing one or more sort fields.
The sortString
parameter must contain one or more comma-separated sort fields. Sort order is defined by prepending a sort field with '+' (ascending) or '-' (descending). Default sort order is ascending.
The mapping of sort field names to expressions is provided in parameter sortFieldMapping
.
Declaration
public static IQueryable<T> OrderBySortString<T>(this IQueryable<T> q, string sortString, SortFieldMapping<T> sortFieldMapping)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable<T> | q | |
System.String | sortString | |
SortFieldMapping<T> | sortFieldMapping | Mapping of sort field names to element member expressions specifying the sort keys. Use SortFieldMappingBuilder<TEntity> to create a mapping using a Fluent API. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable<T> | New IQueryable instance with applied sorting |
Type Parameters
Name | Description |
---|---|
T |