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 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 }); } }