public async Task <IActionResult> Enable(long id) { var result = new ResultDto <bool>(); try { var modelExists = await _paisService.GetByIdAsync(id); if (modelExists == null) { throw new AwayException("No existe el registro que desea activar."); } result.Data = await _paisService.EnableAsync(id); } catch (AwayException ex) { _logger.Error(KOriginApp, ex.Message, ex); result.AddError(ex.Message); } catch (Exception ex) { _logger.Error(KOriginApp, ex.Message, ex); result.AddError("OcurriĆ³ un error al intentar activar el registro."); } return(Ok(result)); }