removes an individual entity instance.
This method allows specifying an entity in a dbSet other then the main one as long as it's specified by the dbSet parameter.
public virtual bool Delete(TEntity entity, DbSet dbSet, bool saveChanges, bool useTransaction)
Parameters
entity
dbSet
Optional -
Allows specifying the DbSet to which the entity passed belongs.
If not specified the current DbSet for the current entity is used
saveChanges
Optional -
If true does a Context.SaveChanges. Set to false
when other changes in the Context are pending and you don't want them to commit
immediately
useTransaction
Optional -
If true the Delete operation is wrapped into a TransactionScope transaction that
ensures that OnBeforeDelete and OnAfterDelete all fire within the same Transaction scope.
Defaults to false as to improve performance.
Overloads:
See also:
Class EfCodeFirstBusinessBase© West Wind Technologies, 1996-2016 • Updated: 12/12/15
Comment or report problem with topic