public async Task <IActionResult> Delete([FromRoute] Guid customerId) { var deleted = await customersService.DeleteCustomerAsync(customerId); if (deleted) { return(Ok()); } return(NotFound()); }
public async Task <IActionResult> DeleteCustomer(int id) { var customerToDelete = await _customersService.GetCustomerAsync(id); if (customerToDelete == null) { return(NotFound()); } await _customersService.DeleteCustomerAsync(customerToDelete.Id); return(Ok(id)); }
public async Task <IActionResult> Delete(int id) { var deleteStatus = await _customersService.DeleteCustomerAsync(id); return(Json(deleteStatus)); }