예제 #1
0
        public IActionResult GetPokemonList()
        {
            try
            {
                var response = _repo.GetList();

                return(response.Count == 0 ? StatusCode((int)HttpStatusCode.NoContent, null) : StatusCode((int)HttpStatusCode.OK, response));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }