Ejemplo n.º 1
0
        // GET: api/TaskManager
        public IEnumerable <Project> GetAllProjects()
        {
            TaskManagerBL  taskManagerBL = new TaskManagerBL();
            List <Project> lstProject    = new List <Project>();

            foreach (var project in taskManagerBL.ReadAllProjects())
            {
                lstProject.Add(new Project()
                {
                    Name      = project.Project1,
                    ProjectId = project.Project_ID,
                    EndDate   = project.End_Date.ToString("dd/MM/yyyy"),
                    StartDate = project.Start_Date.ToString("dd/MM/yyyy"),
                    Priority  = project.Priority
                });
            }
            return(lstProject);
        }