public IActionResult Delete(int id) { try { _deleteCustomer.Execute(id); return(NoContent()); } catch (EntityNotFoundException e) { return(NotFound(e.Message)); } catch (Exception) { return(StatusCode(500, "Server error")); } }
public async Task <IActionResult> DeleteCustomer([FromRoute] string id) { await _deleteCustomerCommand.Execute(id); return(NoContent()); }
public async Task <ActionResult> Delete(string id) { await _customerDeleteContext.Execute(id); return(new NoContentResult()); }
public async Task <IActionResult> Delete(string id) { await _deleteCustomerCommand.Execute(id); return(new NoContentResult()); }