public void AnyReturnsFalseWhenSequencyIsEmpty() { var source = new Int32[0]; Assert.That(source.Any(), Is.False); }
public Boolean DeleteTask(Int32[] taskId) { if (taskId != null && taskId.Count() != 0) { IQueryable<Task> tasks = _taskRepository.GetList().Where(x => taskId.Any(a => a == x.TaskId)); foreach (Task task in tasks) { _taskRepository.Remove(task); } _taskRepository.Save(); return true; } return false; }