-
Notifications
You must be signed in to change notification settings - Fork 0
TQueryLinqExtensions_Single_bY4d6dq6kTs2ewmGc2EbxQ
Jacob Spitzer edited this page Aug 28, 2022
·
2 revisions
Returning the only record of the TQuery recordset that satisfies a specified condition, and throws an exception if there is not exactly one record that satisfies the predicate function.
public static Table Single<Table>(this DbEasyConnect.DbEcExtended<Table> tQuery, System.Linq.Expressions.Expression<System.Func<Table,bool>> predicate);
Table
The type of the records of table class. need to be a class with the [Table("")] attribute.
tQuery
DbEasyConnect.DbEcExtended<Table>
An DbEcExtended<T> to apply the predicate to.
predicate
System.Linq.Expressions.Expression<System.Func<Table,System.Boolean>>
A function to test each record for a condition.
Table
The single record in the TQuery recordset that passes the test in the specified predicate function.