/// <summary> /// Converts this instance of <see cref="SingleLog"/> to an instance of <see cref="SingleLogDto"/>. /// </summary> /// <param name="entity"><see cref="SingleLog"/> to convert.</param> public static SingleLogDto ToDTO(this SingleLog entity) { if (entity == null) { return(null); } var dto = new SingleLogDto(); dto.SingleLogId = entity.SingleLogId; dto.SingleValue = entity.SingleValue; dto.TimeStamp = entity.TimeStamp; dto.VariableId = entity.VariableId; entity.OnDTO(dto); return(dto); }
/// <summary> /// Converts this instance of <see cref="SingleLogDto"/> to an instance of <see cref="SingleLog"/>. /// </summary> /// <param name="dto"><see cref="SingleLogDto"/> to convert.</param> public static SingleLog ToEntity(this SingleLogDto dto) { if (dto == null) { return(null); } var entity = new SingleLog(); entity.SingleLogId = dto.SingleLogId; entity.SingleValue = dto.SingleValue; entity.TimeStamp = dto.TimeStamp; entity.VariableId = dto.VariableId; dto.OnEntity(entity); return(entity); }
/// <summary> /// Invoked when <see cref="ToEntity"/> operation is about to return. /// </summary> /// <param name="entity"><see cref="SingleLog"/> converted from <see cref="SingleLogDto"/>.</param> static partial void OnEntity(this SingleLogDto dto, SingleLog entity);
/// <summary> /// Invoked when <see cref="ToDTO"/> operation is about to return. /// </summary> /// <param name="dto"><see cref="SingleLogDto"/> converted from <see cref="SingleLog"/>.</param> static partial void OnDTO(this SingleLog entity, SingleLogDto dto);