Exemple #1
0
 public IActionResult Put([FromBody] CustomerDto customerDto, long CustomerId)
 {
     try
     {
         _customerApplicationService.update(customerDto, CustomerId);
         return(Ok(this.responseHandler.getOkCommandResponse("Customer updated!", Constantes.HttpStatus.Success)));
     }
     catch (ArgumentException ex)
     {
         return(BadRequest(this.responseHandler.getAppCustomErrorResponse(ex.Message)));
     }
     catch (Exception ex)
     {
         return(StatusCode(Constantes.HttpStatus.ErrorServer, this.responseHandler.getAppExceptionResponse()));
     }
 }