SqlTable<TEntity>.RemoveKeyAsync Method

Executes a DELETE command for the entity whose primary key matches the id parameter.

Namespace: DbExtensions
Assembly: DbExtensions.dll

Syntax

public ValueTask<bool> RemoveKeyAsync(
	Object id,
	CancellationToken cancellationToken = default
)

Parameters

id  Object

The primary key value.

cancellationToken  CancellationToken  (Optional)

The CancellationToken to monitor for cancellation requests. The default is None.

Return Value

ValueTask<Boolean>
true if a record that matches id was found and deleted; otherwise, false.

See Also

Reference

SqlTable<TEntity> Class
DbExtensions Namespace

© Max Toro Q.