/// <summary> /// Converts this instance of <see cref="VisitorHistory"/> to an instance of <see cref="VisitorHistoryDTO"/>. /// </summary> /// <param name="entity"><see cref="VisitorHistory"/> to convert.</param> public static VisitorHistoryDTO ToDTO(this VisitorHistory entity) { if (entity == null) { return(null); } var dto = new VisitorHistoryDTO(); dto.ID = entity.ID; dto.VisitorID = entity.VisitorID; dto.FirstName = entity.FirstName; dto.LastName = entity.LastName; dto.ModifiedByUserID = entity.ModifiedByUserID; dto.ModifiedDate = entity.ModifiedDate; dto.AuditDate = entity.AuditDate; entity.OnDTO(dto); return(dto); }
/// <summary> /// Converts this instance of <see cref="VisitorHistoryDTO"/> to an instance of <see cref="VisitorHistory"/>. /// </summary> /// <param name="dto"><see cref="VisitorHistoryDTO"/> to convert.</param> public static VisitorHistory ToEntity(this VisitorHistoryDTO dto) { if (dto == null) { return(null); } var entity = new VisitorHistory(); entity.ID = dto.ID; entity.VisitorID = dto.VisitorID; entity.FirstName = dto.FirstName; entity.LastName = dto.LastName; 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="VisitorHistory"/> converted from <see cref="VisitorHistoryDTO"/>.</param> static partial void OnEntity(this VisitorHistoryDTO dto, VisitorHistory entity);
/// <summary> /// Invoked when <see cref="ToDTO"/> operation is about to return. /// </summary> /// <param name="dto"><see cref="VisitorHistoryDTO"/> converted from <see cref="VisitorHistory"/>.</param> static partial void OnDTO(this VisitorHistory entity, VisitorHistoryDTO dto);