public async Task <ActionResult <IEnumerable <Entrada> > > ObtenerEntradas() { object result; try { var res = await EntradaService.GetAllEntrada(); result = new { Code = 100, Message = "Success", Result = res }; } catch (Exception ex) { result = new { Code = -100, ex.Message }; } return(Ok(result)); }