Skip to content

Commit 106cae7

Browse files
fdijEamonNerbonne
andauthored
Update src/ProgressOnderwijsUtils/Data/SqlBatch.cs
Co-authored-by: Eamon Nerbonne <[email protected]>
1 parent f2daff4 commit 106cae7

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/ProgressOnderwijsUtils/Data/SqlBatch.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,10 +267,7 @@ public void Execute(SqlConnection conn, IBufferWriter<byte> buffer, JsonWriterOp
267267
} else if (type == typeof(byte[])) {
268268
var bytes = reader.GetFieldValue<byte[]>(i);
269269
if (sqlType is "rowversion" or "timestamp" && rowVersionAsNumber) {
270-
if (BitConverter.IsLittleEndian) {
271-
Array.Reverse(bytes);
272-
}
273-
writer.WriteNumber(name, BitConverter.ToUInt64(bytes, 0));
270+
writer.WriteNumber(name, BinaryPrimitives.ReadUInt64BigEndian(bytes));
274271
} else {
275272
writer.WriteBase64String(name, bytes);
276273
}

0 commit comments

Comments
 (0)