public List <TaskMainDTO> GetAllTasks() { IList <TaskMainDAO> taskMainDaoCollection = TaskMainDAO.GetAllTasksFromDB(); IList <ITask> taskMainCollection = ConverterDAOtoDomain.TaskMainDaoToTaskMain(taskMainDaoCollection); List <TaskMainDTO> taskMainDtoCollection = ConverterDomainToDTO.TaskMainToTaskMainDTO(taskMainCollection); return(taskMainDtoCollection); }
public List <TaskMainDTO> FindTasks(string textQuery) { SearchProviderDAO searchProvider = new SearchProviderDAO(); IList <TaskMainDAO> taskMainDAO = searchProvider.Find(textQuery); IList <ITask> taskMain = ConverterDAOtoDomain.TaskMainDaoToTaskMain(taskMainDAO); List <TaskMainDTO> taskMainDTO = ConverterDomainToDTO.TaskMainToTaskMainDTO(taskMain); return(taskMainDTO); }
public List <TaskMainDTO> GetMatchedTasks(string taskID, Sources linkToTracker, Int32 tokenID) { TaskMainDAO taskMainDAO = TaskMainDAO.GetTaskFromDB(taskID, linkToTracker, tokenID); ITask taskMain = ConverterDAOtoDomain.TaskMainDaoToTaskMain(taskMainDAO); List <ITask> matchedTasks = new List <ITask>(); matchedTasks.Add(taskMain); matchedTasks.AddRange(taskMain.MatchedTasks); List <TaskMainDTO> taskMainDTO = ConverterDomainToDTO.TaskMainToTaskMainDTO(matchedTasks); return(taskMainDTO); }