Skip to content

GetByPkAsync Method ​

Definition ​

  • Namespace: JASE.Database
  • Assembly: JASE.Database.dll

Overloads ​

NameDescription
Task<T> GetByPkAsync(object id, CancellationToken cancellationToken = null)Fetches a record by primary key value, or null if no row matches.
Task<object> GetByPkAsync(Type entityType, object id, CancellationToken cancellationToken = null)Fetches a record by primary key value using a runtime entity type.

Task<object> GetByPkAsync(Type entityType, object id, CancellationToken cancellationToken = null) ​

csharp
Task<object> GetByPkAsync(Type entityType, object id, CancellationToken cancellationToken = null)

Fetches a record by primary key value using a runtime entity type.

Task<T> GetByPkAsync(object id, CancellationToken cancellationToken = null) ​

csharp
Task<T> GetByPkAsync(object id, CancellationToken cancellationToken = null)

Fetches a record by primary key value, or null if no row matches.

Type parameters ​

NameDescription
TThe entity (row) type.

Parameters ​

NameDescription
cancellationTokenCancellation token.
idPrimary key value.