Пример #1
0
        public List <string> RetrieveCategories()
        {
            try
            {
                var categories = _chuckRepository.GetCategories();

                return(categories);
            }
            catch (Exception ex)
            {
                throw new Exception($"RetrieveCategories - {ex.Message}");
            }
        }
Пример #2
0
        public async Task <List <string> > Handle()
        {
            List <string> categories = new List <string>();

            try
            {
                categories = await _chuckRepository.GetCategories();
            }
            catch (Exception e)
            {
                _logger.LogCritical(e, e.Message);
            }

            return(categories);
        }