예제 #1
0
        public void Remove(int id)
        {
            var task = _taskManagerRepository.GetById(id);

            if (task == null)
            {
                throw new TaskNotFoundException(id);
            }

            _taskManagerRepository.Delete(id);
        }
        public async Task DeleteTask(int id)
        {
            var taskEntity = await _taskManagerRepository.Get(id);

            if (taskEntity == null)
            {
                throw new TaskDetailsException(ErrorCodes.TaskNotFoundResponse, "Task is empty");
            }

            await _taskManagerRepository.Delete(taskEntity);
        }
        public async Task Delete(int id)
        {
            var taskEntity = await GetTaskDetails(id);

            await _taskManagerRepository.Delete(taskEntity);
        }