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)
Optional - Allows specifying the DbSet to which the entity passed belongs. If not specified the current DbSet for the current entity is used
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
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.
See also:Class EfCodeFirstBusinessBase
Comment or report problem with topic