public List <TaskModel> GetTasks()
        {
            EntityMapper <Task, TaskModel> mapObj = new EntityMapper <Task, TaskModel>();
            List <Task>      taskList             = ProjectManagerRepository.GetTasks();
            List <TaskModel> taskModels           = new List <TaskModel>();

            foreach (var task in taskList)
            {
                var taskModel = mapObj.Translate(task);
                taskModel.ParentTaskName = ProjectManagerRepository.GetParentTask(task.Parent_ID).ParentTaskName;
                taskModels.Add(taskModel);
            }

            return(taskModels);
        }
        public List <ProjectModel> GetProjects()
        {
            EntityMapper <Project, ProjectModel> mapObj = new EntityMapper <Project, ProjectModel>();
            List <Project>      projectList             = ProjectManagerRepository.GetProjects();
            List <ProjectModel> projectModels           = new List <ProjectModel>();

            foreach (var project in projectList)
            {
                var projectModel = mapObj.Translate(project);
                projectModel.NoOfTasks      = ProjectManagerRepository.GetTasks().Where(x => x.Project_ID == projectModel.Project_ID).ToList().Count;
                projectModel.CompletedTasks = ProjectManagerRepository.GetTasks().Where(x => x.Project_ID == projectModel.Project_ID && x.End_Date.Date <= DateTime.Now.Date).ToList().Count;
                projectModels.Add(projectModel);
            }

            return(projectModels);
        }
        public void GetTasksTest()
        {
            var tasks = ProjectManagerRepository.GetTasks();

            Assert.NotZero(tasks.Count);
        }