コード例 #1
0
        public async Task <bool> UpdateToDoItemAsync(CreateUpdateToDoItemDto input)
        {
            var toDoItem = await _toDoItemRepository.GetAsync(input.Id);

            await _toDoManager.UpdatToDoItem(toDoItem, input.Description, input.Note, input.DueDate);

            await _toDoItemRepository.UpdateAsync(toDoItem);

            return(true);
        }
コード例 #2
0
        public async Task <bool> AddToDoItem(CreateUpdateToDoItemDto input)
        {
            var toDo = Repository.WithDetails(x => x.ToDoItems).FirstOrDefault(x => x.Id == input.ParentId);

            toDo?.AddToDoItem(input.Description, input.DueDate);

            await Repository.UpdateAsync(toDo);

            return(true);
        }