/// <summary> /// Converts this instance of <see cref="VisitHistory"/> to an instance of <see cref="VisitHistoryDTO"/>. /// </summary> /// <param name="entity"><see cref="VisitHistory"/> to convert.</param> public static VisitHistoryDTO ToDTO(this VisitHistory entity) { if (entity == null) { return(null); } var dto = new VisitHistoryDTO(); dto.ID = entity.ID; dto.VisitID = entity.VisitID; dto.ScheduledCheckInTime = entity.ScheduledCheckInTime; dto.ScheduledCheckOutTime = entity.ScheduledCheckOutTime; dto.ActualCheckInTime = entity.ActualCheckInTime; dto.ActualCheckOutTime = entity.ActualCheckOutTime; dto.ModifiedByUserID = entity.ModifiedByUserID; dto.ModifiedDate = entity.ModifiedDate; dto.AuditDate = entity.AuditDate; entity.OnDTO(dto); return(dto); }
/// <summary> /// Converts this instance of <see cref="VisitHistoryDTO"/> to an instance of <see cref="VisitHistory"/>. /// </summary> /// <param name="dto"><see cref="VisitHistoryDTO"/> to convert.</param> public static VisitHistory ToEntity(this VisitHistoryDTO dto) { if (dto == null) { return(null); } var entity = new VisitHistory(); entity.ID = dto.ID; entity.VisitID = dto.VisitID; entity.ScheduledCheckInTime = dto.ScheduledCheckInTime; entity.ScheduledCheckOutTime = dto.ScheduledCheckOutTime; entity.ActualCheckInTime = dto.ActualCheckInTime; entity.ActualCheckOutTime = dto.ActualCheckOutTime; entity.ModifiedByUserID = dto.ModifiedByUserID; entity.ModifiedDate = dto.ModifiedDate; entity.AuditDate = dto.AuditDate; dto.OnEntity(entity); return(entity); }
/// <summary> /// Invoked when <see cref="ToEntity"/> operation is about to return. /// </summary> /// <param name="entity"><see cref="VisitHistory"/> converted from <see cref="VisitHistoryDTO"/>.</param> static partial void OnEntity(this VisitHistoryDTO dto, VisitHistory entity);
/// <summary> /// Invoked when <see cref="ToDTO"/> operation is about to return. /// </summary> /// <param name="dto"><see cref="VisitHistoryDTO"/> converted from <see cref="VisitHistory"/>.</param> static partial void OnDTO(this VisitHistory entity, VisitHistoryDTO dto);