Class SortByVersion
- Namespace
- Geotab.Checkmate.ObjectModel
- Assembly
- Geotab.Checkmate.ObjectModel.dll
public class SortByVersion : ISort
- Inheritance
-
SortByVersion
- Implements
- Inherited Members
Constructors
SortByVersion(SortDirection?, long?, Id?)
Initializes a new instance of the SortByVersion class.
public SortByVersion(SortDirection? direction = SortDirection.Asc, long? offset = null, Id? lastId = null)
Parameters
direction
SortDirection?The sort direction.
offset
long?The offset.
lastId
IdThe 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 "version" property for subsequent pages.
public long? Offset { get; set; }
Property Value
- long?
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.