Table of Contents

Class OrderByClause

Namespace
Breeze.Core
Assembly
Breeze.Core.dll

The orderBy clause of an EntityQuery - the properties to sort by, and their directions.

public class OrderByClause
Inheritance
OrderByClause
Inherited Members

Remarks

Each path may carry a direction, as in "OrderDate desc"; anything other than "desc" after the path sorts ascending. A path may walk navigation properties, as in "Customer.CompanyName".

Constructors

OrderByClause(IEnumerable<string>)

Create an orderBy clause, splitting each path from its optional direction.

public OrderByClause(IEnumerable<string> propertyPaths)

Parameters

propertyPaths IEnumerable<string>

The sort paths, each optionally followed by "desc", e.g. "OrderDate desc".

Properties

OrderByItems

The sort paths split into property and direction.

public IEnumerable<OrderByClause.OrderByItem> OrderByItems { get; }

Property Value

IEnumerable<OrderByClause.OrderByItem>

PropertyPaths

The sort paths as they were written, direction included.

public IEnumerable<string> PropertyPaths { get; }

Property Value

IEnumerable<string>

Methods

From(IEnumerable?)

Build an orderBy clause, or null if the query does not sort.

public static OrderByClause? From(IEnumerable? propertyPaths)

Parameters

propertyPaths IEnumerable

The sort paths; null when the query has no orderBy clause.

Returns

OrderByClause

The clause, or null if propertyPaths was null.

Validate(Type)

Resolve every sort path against the entity type being queried.

public void Validate(Type entityType)

Parameters

entityType Type

The type the query returns.

Exceptions

Exception

A path does not name a property of that type.