Exemple #1
0
        public override VerbViewBase Run()
        {
            // TODO By decreasing the number of query calls, the performance can be improved here, but heck yeah for now.
            // I will consider performance tuning in the next iteration.
            var tasks       = _todoTaskRepository.GetActiveTasksOrderedByAddedDate();
            var activeTasks = tasks.Where((t, i) => Options.TaskIds.Contains(i)).ToList();

            foreach (var activeTask in activeTasks)
            {
                _todoTaskRepository.MarkComplete(activeTask);
            }

            return(new CompleteTaskView(activeTasks));
        }