public static TaskLog To(TaskLogAPI item) { return(new TaskLog { ID = item.ID, LogDate = item.LogDate, StartTime = item.StartTime, EndTime = item.EndTime, Description = item.Description, TaskID = item.TaskID, Task = TaskAPI.To(item.Task, false), CheckIns = CheckInAPI.To(item.CheckIns), Comments = TaskLogCommentAPI.To(item.Comments) }); }
public static CheckIn To(CheckInAPI item) { return(new CheckIn { ID = item.ID, Comment = item.Comment, CheckInTime = item.CheckInTime, TaskLogID = item.TaskLogID, TaskLog = item.TaskLog != null?TaskLogAPI.To(item.TaskLog) : null, CodeBranchID = item.CodeBranchID, CodeBranch = item.CodeBranch != null?CodeBranchAPI.To(item.CodeBranch) : null, TaskCheckIns = TaskCheckInAPI.To(item.TaskCheckIns), IsNew = item.IsNew }); }
public static TaskAPI From(Task item, bool includeTaskLogs = true, bool includeComments = true) { if (item == null) { return(null); } else { return(new TaskAPI { ID = item.ID, Title = item.Title, TaskType = item.TaskType, IsActive = item.IsActive, CheckIns = item.CheckIns != null?TaskCheckInAPI.From(item.CheckIns).ToList() : null, Logs = includeTaskLogs && item.Logs != null?TaskLogAPI.From(item.Logs).ToList() : null, Comments = includeComments && item.Comments != null?TaskCommentAPI.From(item.Comments).ToList() : null, RequirementID = item.RequirementID, Requirement = RequirementAPI.From(item.Requirement, false), IsNew = item.IsNew }); } }
public static Task To(TaskAPI item, bool includeTaskLogs = true, bool includeComments = true) { if (item == null) { return(null); } else { return(new Task { ID = item.ID, Title = item.Title, TaskType = item.TaskType, IsActive = item.IsActive, CheckIns = TaskCheckInAPI.To(item.CheckIns), Logs = includeTaskLogs ? TaskLogAPI.To(item.Logs) : null, Comments = includeComments ? TaskCommentAPI.To(item.Comments) : null, RequirementID = item.RequirementID, Requirement = RequirementAPI.To(item.Requirement), IsNew = item.IsNew }); } }