Table of Contents

Class SortById

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

Implementation of ISort for sorting by the Id field in Entitys.

public class SortById : ISort
Inheritance
SortById
Implements
Inherited Members

Constructors

SortById(SortDirection?, Id?, Id?)

Initializes a new instance of the SortById class.

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

Parameters

direction SortDirection?

The sort direction.

offset Id

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 "id" property for subsequent pages.

public Id? Offset { get; set; }

Property Value

Id

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.