public async Task DeleteAsync(Guid id) { if (!ValidateId(id)) { return; } await _service.DeleteAsync(w => w.Id == id); }
public async Task Delete(Guid id) { if (!ValidateId(id)) { return; } await service.DeleteAsync(id); }
public async Task <IActionResult> Delete(Guid id) { if (id == Guid.Empty) { return(BadRequest()); } await _productDomainService.DeleteAsync(w => w.Id == id); return(CreateResponseOnDelete(name)); }
public virtual async Task <IActionResult> Delete(long id) { var entity = await _repository.GetByIdAsync(id); if (entity == null) { return(NotFound()); } await _domainService.DeleteAsync(entity); return(Ok()); }
public async Task DeleteAsync(Guid id) { if (!ValidateId(id)) { return; } using (var uow = _unitOfWorkManager.Begin()) { await _service.DeleteAsync(w => w.Id == id); await uow.CompleteAsync().ForAwait(); } }
public async Task <IActionResult> Delete(Guid id) { await _crudService.DeleteAsync(id); return(CreateResponseOnDelete()); }