gpt4 book ai didi

c# - 时间戳由代码生成的数据类型

转载 作者:行者123 更新时间:2023-11-30 15:00:58 27 4
gpt4 key购买 nike

我的 SQL Server 数据库中应该有时间戳数据类型行。我正在使用代码优先方法,所以我想从我的域实用程序类生成这个字段。

那么,如何在数据库中声明这个属性生成为时间戳呢?

最佳答案

您可以使用用 [Timestamp] 修饰的字节数组属性:

[Timestamp] 
public byte[] SomeTimestamp { get; set; }

您可能还想查看 following article .

关于c# - 时间戳由代码生成的数据类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14796202/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com