Skip to content

TQueryLinqExtensions_FirstOrDefault_ybzFNadl8k+w+xK5Xeskuw

Jacob Spitzer edited this page Aug 28, 2022 · 2 revisions

TQueryLinqExtensions.FirstOrDefault<Table>(DbEc<Table>) Method

Executes a single-row query, returning the first record of the TQuery recordset, or NULL if no record is found.

public static Table FirstOrDefault<Table>(this DbEasyConnect.DbEc<Table> tQuery);

Type parameters

Table
The type of the records of table class. need to be a class with the [Table("")] attribute.

Parameters

tQuery DbEasyConnect.DbEc<Table>
An DbEc<T>.

Returns

Table
NULL if TQuery recordset is empty or if no record is found; otherwise, the first record in TQuery recordset.

Clone this wiki locally