Skip to content

DeleteByPkAsync Method ​

Definition ​

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

Overloads ​

NameDescription
Task<bool> DeleteByPkAsync(object id, int commandTimeout = null, CancellationToken cancellationToken = null)Deletes a record by primary key value.
Task<bool> DeleteByPkAsync(Type entityType, object id, int commandTimeout = null, CancellationToken cancellationToken = null)Deletes a record by primary key value using a runtime entity type.

Task<bool> DeleteByPkAsync(Type entityType, object id, int commandTimeout = null, CancellationToken cancellationToken = null) ​

csharp
Task<bool> DeleteByPkAsync(Type entityType, object id, int commandTimeout = null, CancellationToken cancellationToken = null)

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

Task<bool> DeleteByPkAsync(object id, int commandTimeout = null, CancellationToken cancellationToken = null) ​

csharp
Task<bool> DeleteByPkAsync(object id, int commandTimeout = null, CancellationToken cancellationToken = null)

Deletes a record by primary key value.

Type parameters ​

NameDescription
TThe entity (row) type.

Parameters ​

NameDescription
cancellationTokenCancellation token.
commandTimeoutCommand timeout in seconds. Use -1 for provider default.
idPrimary key value.

Returns ​

true if a row was deleted; otherwise false.