Example #1
0
 public void Delete(Task task, Account account)
 {
     if (!task.BelongsToAccount(account))
         throw new ApplicationException("The task does not belong to the account.");
     task.TaskList.RemoveTask(task);
     _repository.Delete(task);
 }