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"));
     }
 }
Exemplo n.º 2
0
        public async Task <IActionResult> DeleteCustomer([FromRoute] string id)
        {
            await _deleteCustomerCommand.Execute(id);

            return(NoContent());
        }
Exemplo n.º 3
0
        public async Task <ActionResult> Delete(string id)
        {
            await _customerDeleteContext.Execute(id);

            return(new NoContentResult());
        }
Exemplo n.º 4
0
        public async Task <IActionResult> Delete(string id)
        {
            await _deleteCustomerCommand.Execute(id);

            return(new NoContentResult());
        }