IDataAccessAdapter.DeleteEntityAsync Method (IEntity2, IPredicateExpression, CancellationToken) |
Async variant of
DeleteEntity(IEntity2, IPredicateExpression).
Deletes the specified entity from the persistent storage. The entity is not usable after this call, the state is set to
OutOfSync.
Will use the current transaction if a transaction is in progress.
Namespace:
SD.LLBLGen.Pro.ORMSupportClasses
Assembly:
SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.10.0.0 (5.10.0)
SyntaxTask<bool> DeleteEntityAsync(
IEntity2 entityToDelete,
IPredicateExpression deleteRestriction,
CancellationToken cancellationToken
)
Function DeleteEntityAsync (
entityToDelete As IEntity2,
deleteRestriction As IPredicateExpression,
cancellationToken As CancellationToken
) As Task(Of Boolean)
Parameters
- entityToDelete
- Type: SD.LLBLGen.Pro.ORMSupportClasses.IEntity2
The entity instance to delete from the persistent storage - deleteRestriction
- Type: SD.LLBLGen.Pro.ORMSupportClasses.IPredicateExpression
Predicate expression, meant for concurrency checks in a delete query - cancellationToken
- Type: System.Threading.CancellationToken
The cancellation token.
Return Value
Type:
Task<Boolean>
true if the delete was succesful, otherwise false.
Exceptions
See Also