Пример #1
0
        public List <TaskDetails> GetAll()
        {
            List <TaskDetails> tdlist = new List <TaskDetails>();
            var taskDetails           = tb.GetTaskDetails().ToList();

            foreach (var item in taskDetails)
            {
                tdlist.Add(new TaskDetails
                {
                    TaskId      = item.Task_ID,
                    Task_Name   = item.TaskName,
                    Parent_Task = item.Parent_Task,
                    StartDate   = (DateTime)item.Start_Date,
                    EndDate     = (DateTime)item.End_Date,
                    priority    = (int)item.Priority
                });
            }
            return(tdlist);
        }