public Boolean Delete <TEntity2>(TEntity2 entity) where TEntity2 : class { if (this == null) { throw new ArgumentNullException(nameof(TEntity)); } lock (locker) { return(EF_Helper_DG <DataBaseEntity> .Delete(entity)); } }
public void Delete_ThreadPool <TEntity2>(TEntity2 entity) where TEntity2 : class { if (this == null) { throw new ArgumentNullException(nameof(TEntity)); } lock (locker) { ThreadPool.QueueUserWorkItem(obj => EF_Helper_DG <DataBaseEntity> .Delete(entity)); } }