Example #1
0
        public virtual async Task <TEntity> DeleteAsync(TKey id)
        {
            await _Repository.DeleteAsync(id);

            await _UnitOfWork.CommitAsync();

            return(await _Repository.GetAsync(id));
        }
        public virtual async Task <TEntity> DeleteAsync(TKey id)
        {
            TEntity entity = await _Repository.DeleteAsync(id);

            if (entity != null)
            {
                await _UnitOfWork.CommitAsync();
            }
            return(entity);
        }
Example #3
0
 public async Task <bool> Delete(Guid id)
 {
     try
     {
         return(await _repository.DeleteAsync(id));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Example #4
0
 public async Task <TEntity> DeleteAsync(TKey id) => await _Repository.DeleteAsync(id);