Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 2ec0a88

Browse files
committed
Fix GetLongScalar MySql bug
1 parent e3bf135 commit 2ec0a88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ServiceStack.OrmLite/OrmLiteReadExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,7 @@ public static long GetLongScalar(this IDbCommand dbCmd)
790790
if (result is DBNull) return default(long);
791791
if (result is int) return (int)result;
792792
if (result is decimal) return Convert.ToInt64((decimal)result);
793-
if (result is ulong) return Convert.ToInt64(result);
793+
if (result is ulong) return (long)Convert.ToUInt64(result);
794794
return (long)result;
795795
}
796796
}

0 commit comments

Comments
 (0)