Appearance
FirstOrDefault Method
Definition
- Namespace:
JASE.Database - Assembly:
JASE.Database.dll
Task<T> FirstOrDefault(QueryBuilder<T> query, CancellationToken cancellationToken = null)
csharp
Task<T> FirstOrDefault(QueryBuilder<T> query, CancellationToken cancellationToken = null)Returns the first record matching the provided query, or null if no rows match.
Type parameters
| Name | Description |
|---|---|
T | The entity (row) type. |
Parameters
| Name | Description |
|---|---|
cancellationToken | Cancellation token. |
query | Query describing predicates, joins, ordering, and projection. |