public PlanTaskDto ToDto() { var result = new PlanTaskDto() { Title = Title, CompleteDate = CompleteDate.ToLocalTime(), CreatedDate = CreatedDate.ToLocalTime(), Creator = Creator.ToDto(), Deadline = Deadline.ToLocalTime(), Description = Description, Id = Id, IsTask = IsTask, SelectedForToday = SelectedForToday, Status = this.Status, RemindAt = RemindAt.ToLocalTime(), ReminderSent = ReminderSent, PlannedBeginDate = PlannedBeginDate.ToLocalTime(), AccessRights = (AccessRights == null ? new List <ACLEntryDto>() : AccessRights.Select(x => x.ToDto())).ToList(), IsShared = IsShared, PlannedDateProcessed = PlannedDateProcessed }; if (Parent != null) { result.ParentTaskId = Parent.Id; result.Parent = Parent.ToDto(); } return(result); }
public Dto.NoteDto ToDto() { var result = new Dto.NoteDto() { Title = Title, CreatedDate = CreatedDate.ToLocalTime(), Creator = Creator.ToDto(), Id = Id, noteType = noteType, text = text }; if (Parent != null) { result.ParentNoteId = Parent.Id; result.Parent = Parent.ToDto(); } return(result); }
public Exam ToDomainModel() { return(new Exam(Guid.Parse(RowKey), Name, (ExamType)Type, Category, CreatedBy, CreatedDate.ToLocalTime(), IsConfirmed)); }