I should have timestamp datatype row inside my SQL Server database. I'm using code-first approach so I want to generate this field from my domain util class.
So, how to declare this property to be generated as timestamp in the database?
I should have timestamp datatype row inside my SQL Server database. I'm using code-first approach so I want to generate this field from my domain util class.
So, how to declare this property to be generated as timestamp in the database?
You could use a byte array decorated with the [Timestamp] attribute:
[Timestamp]
public byte[] SomeTimestamp { get; set; }
You might also want to checkout the following article.