| RepositoryE, KDeleteAsync Method |
Deletes the entity with a key from the database.
Namespace: LiteRepositoryAssembly: LiteRepository (in LiteRepository.dll) Version: 2.0.4
Syntaxpublic virtual Task<int> DeleteAsync(
K key
)
Parameters
- key
- Type: K
Key of the entity.
Return Value
Type:
TaskInt32A task representing the asynchronous operation.
ExamplesFor deleting the entity:
var key = new EntityKey { Id = 12 };
await repository.DeleteAsync(entity);
See Also