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

Commit 13ac92f

Browse files
committed
Merge pull request #306 from maksimenko/master
avoid casting exception when db provider returns ulong for GetLongScalar...
2 parents ee30f2a + 21371a0 commit 13ac92f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/ServiceStack.OrmLite/OrmLiteReadExtensions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -790,6 +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);
793794
return (long)result;
794795
}
795796
}

0 commit comments

Comments
 (0)