Table of Contents

Class SortByName

Namespace
Geotab.Checkmate.ObjectModel
Assembly
Geotab.Checkmate.ObjectModel.dll

Implementation of ISort for sorting by name field in Entitys.

public class SortByName : ISort
Inheritance
SortByName
Implements
Inherited Members

Constructors

SortByName(SortDirection?, string?, Id?)

Initializes a new instance of the SortByName class.

public SortByName(SortDirection? direction = SortDirection.Asc, string? offset = null, Id? lastId = null)

Parameters

direction SortDirection?

The sort direction.

offset string

The offset.

lastId Id

The last id.

Properties

LastId

Gets or sets the lastId. Can be null but recommended to use alongside offset when sorting by a non-unique field like "name" or any DateTime field. It ensures that no records are missed at the page boundaries.

public Id? LastId { get; set; }

Property Value

Id

The last id.

Offset

Gets or sets the offset. Used in paging to indicate where the last page left off, the value can be null for the first page then becomes the last known value of the "name" property for subsequent pages.

public string? Offset { get; set; }

Property Value

string

The offset.

SortBy

Gets or sets the field to sort by.

public string SortBy { get; set; }

Property Value

string

The sort field.

SortDirection

Gets or sets the sort direction.
Default is Asc.

public SortDirection? SortDirection { get; set; }

Property Value

SortDirection?

The sort direction.