예제 #1
0
        public async Task <ActionResult <IEnumerable <Estadio> > > ObtenerEstadios()
        {
            object result;

            try
            {
                var res = await EstadioService.GetAllEstadios();

                result = new { Code = 100, Message = "Success", Result = res };
            }
            catch (Exception ex)
            {
                result = new { Code = -100, ex.Message };
            }

            return(Ok(result));
        }