Skip to content

DeleteAsync Method ​

Definition ​

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

Overloads ​

NameDescription
Task<bool> DeleteAsync(T item, int commandTimeout = null, CancellationToken cancellationToken = null)Deletes a record using the entity primary key value.
Task<bool> DeleteAsync(Type entityType, object item, int commandTimeout = null, CancellationToken cancellationToken = null)Deletes a record using a runtime entity type and instance.

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

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

Deletes a record using a runtime entity type and instance.

Task<bool> DeleteAsync(T item, int commandTimeout = null, CancellationToken cancellationToken = null) ​

csharp
Task<bool> DeleteAsync(T item, int commandTimeout = null, CancellationToken cancellationToken = null)

Deletes a record using the entity primary key value.

Type parameters ​

NameDescription
TThe entity (row) type.

Parameters ​

NameDescription
cancellationTokenCancellation token.
commandTimeoutCommand timeout in seconds. Use -1 for provider default.
itemItem whose primary key identifies the row to delete.

Returns ​

true if a row was deleted; otherwise false.