public Taskset GetTaskById(int Id) { Taskset taskset = new Taskset(); taskset = pmdb.Tasks.Where(x => x.Task_ID == Id).Select(t => new Taskset() { Task_ID = t.Task_ID, TaskName = t.TaskName, Priority = t.Priority, Start_Date = t.Start_Date, End_Date = t.End_Date }).FirstOrDefault(); return(taskset); }
public void Post([FromBody] Taskset item) { Task task = new Task(); task.TaskName = item.TaskName; task.Parent_ID = item.Parent_ID; task.Priority = item.Priority; task.Project_ID = item.Project_ID; task.Priority = item.Priority; task.Start_Date = item.Start_Date; task.End_Date = item.End_Date; task.Status = item.Status; int taskid = pbl.AddTask(task); pbl.UpdateUserTaskId(item.User_ID, taskid); }