public Task DeleteUserTask(int userId, int[] userTaskIds) { var userTasksQuery = _userTaskRepository.List() // Filtering our query by user id to make sure those tasks really belong to them .Where(x => x.User.Id == userId && userTaskIds.Contains(x.Id)); foreach (var userTask in userTasksQuery.ToList()) { _userTaskRepository.Delete(userTask.Id); } return(Task.FromResult(true)); }
public bool Delete(IDbConnection connection, int taskId) { var old = _uTaskCache.GetById(connection, taskId, true); if (old == null) { return(true); } var sucsess = _userTaskRepo.Delete(connection, taskId); //_provider.Commit(); if (sucsess) { _uTaskCache.DeleteItem(taskId); } else { throw new NotImplementedException(Error.ErrorInUpdateDb); } return(sucsess); }
public async Task Delete(int id) { await _userTaskRepository.Delete(id); }
public void Delete(long taskId) { userTaskRepository.Delete(taskId); }
public void Delete(UserTask userTask) { _userTaskRepository.Delete(userTask); }