示例#1
0
 public IResult Delete(int id)
 {
     _taskDal.Delete(new Task {
         Id = id
     });
     return(new SuccessResult());
 }
示例#2
0
 //To delete selected object
 public void DeleteTask(Task task)
 {
     //To delete subtasks that is belong to deleted task
     foreach (var item in _subtaskDal.GetAll(x => x.TaskId == task.TaskId))
     {
         _subtaskDal.Delete(item);
     }
     _taskDal.Delete(task);
 }
示例#3
0
        public IDataResult <Task> Remove(int taskId)
        {
            var response = _taskDal.Get(a => a.Id == taskId && a.Status == true);

            if (response == null)
            {
                return(new ErrorDataResult <Task>(Messages.TaskNotExists));
            }
            response.Status = false;
            _taskDal.Delete(response);
            return(new SuccessDataResult <Task>(response, Messages.TaskDeleted));
        }
示例#4
0
 public void Delete(Task entity)
 {
     _taskDal.Delete(entity);
 }
 public void Delete(Task table)
 {
     _taskDal.Delete(table);
 }
        public void Delete(int taskId)
        {
            var task = _taskDal.Get(t => t.Id == taskId);

            _taskDal.Delete(task);
        }
 public async Task <bool> Delete(int id)
 {
     return(await _taskDal.Delete(id));
 }
示例#8
0
 public void Delete(ToDoTask task)
 {
     _taskDal.Delete(task);
 }
示例#9
0
 public MResult Delete(string id)
 {
     _dal.Delete(id);
     return(new MResult(Success.success));
 }
示例#10
0
 public void Delete(Tasks task)
 {
     _taskDal.Delete(task);
 }