Exemplo n.º 1
0
 public void AnyReturnsFalseWhenSequencyIsEmpty()
 {
     var source = new Int32[0];
     Assert.That(source.Any(), Is.False);
 }
Exemplo n.º 2
0
        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;
        }