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