Exemplo n.º 1
0
        public async Task <ActionResult <TypingList> > GetTypings_List()
        {
            try{
                TypingList results = await _pokemonService.GetTypings_List();

                return(new OkObjectResult(results));
            }
            catch (Exception ex) {
                _logger.LogError(ex.Message);
                return(new StatusCodeResult(500));
            }
        }
Exemplo n.º 2
0
        public async Task <TypingList> GetTypings_List()
        {
            // Get list of Typing names
            var results = await _typeRepository.GetTypings_List();

            if (results.Count <= 0)
            {
                return(null);
            }

            TypingList typingList = new TypingList()
            {
                Names = results
            };

            return(typingList);
        }