Returns the last object in the collection respectively filtered and sorted by the collection's Subset and OrderBy values. It differs from ObjectByOrdinal in that it only loads the first record from the database table not the entire table.

Namespace: DatabaseObjects.Generic
Assembly: DatabaseObjects (in DatabaseObjects.dll) Version: 3.8.1.0

Syntax

C#
protected T ObjectByOrdinalLast()
Visual Basic
Protected Function ObjectByOrdinalLast As T
Visual C++
protected:
T ObjectByOrdinalLast()

Return Value

IDatabaseObject (DatabaseObjects.IDatabaseObject)

Examples

CopyC#
'Assuming this class is the Suppliers class

'Ideal for loading default objects
Dim objDefaultSupplier As Supplier = MyBase.ObjectByOrdinalFirst

See Also