public JsonResult GetListPessoasPrenotacao(long IdPrenotacao) { bool resp = false; string message = string.Empty; IEnumerable <DtoPessoaPesxPre> listaPes = new List <DtoPessoaPesxPre>(); string nomeMetodo = string.Format("{0}.{1}", MethodBase.GetCurrentMethod().DeclaringType.FullName, MethodBase.GetCurrentMethod().Name); try { using (AppServiceAtos appServiceAtos = new AppServiceAtos(this.UfwCartNew, this.IdCtaAcessoSist)) { listaPes = appServiceAtos.GetListPessoasPrenotacao(IdPrenotacao); resp = true; message = "Lista de pessoas da prenotação obtida com sucesso!"; } } catch (Exception ex) { resp = false; TypeInfo t = this.GetType().GetTypeInfo(); IOFunctions.GerarLogErro(t, ex); message = "Falha em " + nomeMetodo + " [" + ex.Message + "]"; // Console.WriteLine(ex); // Response.StatusCode = 500; // Response.Status = "Erro ao buscar os dados das pessoas"; } //JsonConvert.SerializeObject() var resultado = new { resposta = resp, msg = message, listaPessoas = listaPes }; return(Json(resultado)); }