Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

ICommonHibernateOperations.Delete(Object, LockMode) Method

Delete the given persistent instance.

[Visual Basic]
Public Sub Delete( _
   ByVal entity As Object, _
   ByVal lockMode As LockMode _
)
[C#]
void Delete(
   object entity,
   LockMode lockMode
);

Parameters

entity
Tthe persistent instance to delete.
lockMode
The lock mode to obtain.

Remarks

Obtains the specified lock mode if the instance exists, implicitly checking whether the corresponding database entry still exists (throwing an OptimisticLockingFailureException if not found).

Exceptions

Exception Type Condition
DataAccessException In case of Hibernate errors

See Also

ICommonHibernateOperations Interface | Spring.Data.NHibernate Namespace | ICommonHibernateOperations.Delete Overload List