public TodoListOutput GetTodoLists(int projectId) { var todoLists = _toDoListManager.GeToDoLists(projectId); return(new TodoListOutput() { ToDoList = todoLists.Select(a => a.MapTo <ToDoListDto>()) }); }
private void ProcessTaskLists(ProjectManageDto projectDetails, int projectId) { var lists = _toDoListManager.GeToDoLists(projectId); var toDoLists = lists as IList <ToDoList> ?? lists.ToList(); if (toDoLists.Any()) { var todoLists = toDoLists.Select(toDoList => toDoList.MapTo <ToDoListDto>()).ToList(); projectDetails.ToDoLists = todoLists; projectDetails.HasTodoTasks = true; } else { projectDetails.HasTodoTasks = false; } }