public JsonResult getAll(DataTableInput input) { DataTableOutput <SalaryTabulator> salaryTabulators = new DataTableOutput <SalaryTabulator>(); DataTableOutput <SalaryTabulatorDTO> salaryTabulatorsDTO = new DataTableOutput <SalaryTabulatorDTO>(); try { salaryTabulators = salaryTabuladorService.GetSalarysTabulators(input); salaryTabulatorsDTO = AutoMapperConfiguration.Instance.Mapper.Map <DataTableOutput <SalaryTabulatorDTO> >(salaryTabulators); } catch (Exception e) { sb.Clear(); sb.Append("An error has ocurred when it try to retrieve Salary Tabulators"); SeriLogHelper.WriteError(e, sb.ToString()); return(new JsonHttpStatusResult(e.Message, HttpStatusCode.InternalServerError)); } return(Json(salaryTabulatorsDTO, JsonRequestBehavior.DenyGet)); }