Table of Contents

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

TEntity

Entity 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

isAscending bool

Whether the sorting is ascending (otherwise descending).

property Expression<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

isAscending bool

Whether the sorting is ascending (otherwise descending).

propertyPath string

Property path (property names separated by dots).

Properties

IsAscending

Whether the sorting is ascending (otherwise descending).

public bool IsAscending { get; }

Property Value

bool

PropertyPath

Property path to sort by (e.g. "Category.Name").

public string PropertyPath { get; }

Property Value

string