SortItem Class

Namespace:
Weavy.Core.Models
Assembly:
Weavy.Core.dll

Represents a sort order in a search. One or more SortItem objects can be added to a Query.

public class SortItem
Inheritance:
System.Object → SortItem

Constructors

SortItem() Initializes a new instance of the SortItem class.
SortItem(String) Initializes a new instance of the SortItem class with the specified column name.
SortItem(String, String) Initializes a new instance of the SortItem class with the specified column name and SortDirection.

Properties

Column Gets or sets the column to sort by.
Direction Gets or sets the direction to sort by (ascending or descending).

Methods

ToString() Returns a string that represents the current SortItem.

Extension Methods

IsNullOrDefault(T) Gets a value indicating if the specified value has the default value of the generic type.
Serialize(Object) Serializes an object, or graph of connected objects, to a byte array.
SerializeToJson(Object, Nullable, JsonSerializerSettings) Serializes an object, or graph of connected objects, to a json string.
IsValid(Object) Determines whether the specified object is valid by evaluating each ValidationAttribute instance that is attached to the object type.