예제 #1
0
        public bool Delete(MainTask mainTask)
        {
            var subtasks = _subTaskRepository.FindByMainProjectId(mainTask.Id);

            if (subtasks.Any())
            {
                foreach (var subtask in subtasks)
                {
                    var _sub = new SubTask {
                        Id = subtask.Id
                    };
                    _subTaskRepository.Delete(_sub);
                }
            }
            return(_mainTaskRepository.Delete(mainTask) > 0);
        }
예제 #2
0
 public IActionResult Delete(int id)
 {
     _subTaskRepo.Delete(id);
     return(NoContent());
 }
예제 #3
0
 public bool Delete(SubTask subtask)
 {
     return(_subTaskRepository.Delete(subtask) > 0);
 }