public IResult Delete(int id) { _taskDal.Delete(new Task { Id = id }); return(new SuccessResult()); }
//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); }
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)); }
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)); }
public void Delete(ToDoTask task) { _taskDal.Delete(task); }
public MResult Delete(string id) { _dal.Delete(id); return(new MResult(Success.success)); }
public void Delete(Tasks task) { _taskDal.Delete(task); }