Click or drag to resize
RepositoryE, KDeleteAsync Method
Deletes the entity with a key from the database.

Namespace: LiteRepository
Assembly: LiteRepository (in LiteRepository.dll) Version: 2.0.4
Syntax
C#
public virtual Task<int> DeleteAsync(
	K key
)

Parameters

key
Type: K
Key of the entity.

Return Value

Type: TaskInt32
A task representing the asynchronous operation.
Examples

For deleting the entity:

C#
var key = new EntityKey { Id = 12 };
await repository.DeleteAsync(entity);
See Also