Click or drag to resize

DataAccessAdapterCoreDeleteEntity Method (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.11.0.0 (5.11.23.1114)
Syntax
public virtual bool DeleteEntity(
	IEntity2 entityToDelete,
	IPredicateExpression deleteRestriction
)

Parameters

entityToDelete
Type: SD.LLBLGen.Pro.ORMSupportClassesIEntity2
The entity instance to delete from the persistent storage
deleteRestriction
Type: SD.LLBLGen.Pro.ORMSupportClassesIPredicateExpression
Predicate expression, meant for concurrency checks in a delete query

Return Value

Type: Boolean
true if the delete was succesful, otherwise false.

Implements

IDataAccessAdapterDeleteEntity(IEntity2, IPredicateExpression)
Exceptions
ExceptionCondition
ORMConcurrencyExceptionWill throw an ORMConcurrencyException if the delete fails.
See Also