public async Task <IActionResult> Delete(Guid id) { var customer = await _customerData.GetById(id); if (customer == null) { return(NotFound()); } _customerData.Remove(customer); await _uow.Commit(); return(Ok()); }
public async Task <ActionResult> Delete(int id) { var customerDapper = await _customerData.GetByIdAsync(id); if (customerDapper is null) { return(NotFound()); } var customer = new Customer(customerDapper); _customerData.Remove(customer); _unitOfWork.Commit(); return(NoContent()); }