如果映射Timestamp类型的数据库列,我应该使用C#中的数据类型? [重复]

时间:2022-09-15 18:39:06

This question already has an answer here:

这个问题在这里已有答案:

My client is using Insight.Database for SQL Server ORM, using C# as the client. I have encountered a SQL Server 2017 database datatype 'Timestamp' and I am unsure what the C# entity type should be? I have downloaded the code for the Insight.Database and have globally searched for Timestamp, but results are empty.

我的客户端使用Insight.Database进行SQL Server ORM,使用C#作为客户端。我遇到过SQL Server 2017数据库数据类型'Timestamp',我不确定C#实体类型应该是什么?我已经下载了Insight.Database的代码,并在全局范围内搜索了Timestamp,但结果为空。

Any ideas what datatype in C# would best represent a SQL Server Timestamp datatype?

任何想法C#中的数据类型最能代表SQL Server Timestamp数据类型?

1 个解决方案

#1


1  

It would be a byte array as that's what you'd use for varbinary.

它将是一个字节数组,因为这是你用于varbinary的。

https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/sql-server-data-type-mappings

#1


1  

It would be a byte array as that's what you'd use for varbinary.

它将是一个字节数组,因为这是你用于varbinary的。

https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/sql-server-data-type-mappings