timestamp类型在语义上等同于binary(8)
VARBINARY(8)对应的c# 类型是byte[],所以建议直接转换成bigint类型,bigint对应的c#的int64
sql:
cast([RVersion] as bigint) as [RVersion]
或者:
CONVERT(bigint,[RVersion])
更新时使用:
WHERE RVersion = CONVERT(TIMESTAMP, @RVersion);