Esempio n. 1
0
        async Task <List <Todo> > ITodosService.GetTodos(string todoType, SortingType sortingType)
        {
            TodoCategory todoCategory = _todoRepository.FindCategoryByName(todoType);

            if (todoCategory == null)
            {
                var ex = new CategoryNotFoundException(404, "Nem található ilyen kategória: " + todoType);
                _logger.LogError($"Nem található ilyen kategória : {todoType}");
                throw ex;
            }
            return(await _todoRepository.GetTodos(todoCategory, sortingType));
        }