Class Sorting<TEntity>
- Namespace
- Magicalizer.Data
- Assembly
- Magicalizer.dll
Sorting of an entity query by a property.
public class Sorting<TEntity> where TEntity : class, IEntity
Type Parameters
TEntityEntity type.
- Inheritance
-
Sorting<TEntity>
- Inherited Members
Constructors
Sorting(bool, Expression<Func<TEntity, object?>>)
Creates a sorting from the expression.
public Sorting(bool isAscending, Expression<Func<TEntity, object?>> property)
Parameters
isAscendingboolWhether the sorting is ascending (otherwise descending).
propertyExpression<Func<TEntity, object>>Expression of the property path.
Sorting(bool, string)
Creates a sorting from the property path.
public Sorting(bool isAscending, string propertyPath)
Parameters
isAscendingboolWhether the sorting is ascending (otherwise descending).
propertyPathstringProperty path (property names separated by dots).
Properties
IsAscending
Whether the sorting is ascending (otherwise descending).
public bool IsAscending { get; }
Property Value
PropertyPath
Property path to sort by (e.g. "Category.Name").
public string PropertyPath { get; }