What is the corresponding variable type of timestamp (SQL Server) in C#?

Question:

I have a field in the database (SeqAlteracao) of type timestamp and I need to map it to C# (Entity Framework).

What is the corresponding type in C# for that type in the bank?

 public **Tipo** SeqAlteracao { get; set; }

Answer:

You can use byte type with TimeStamp annotation

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

Take a look at this tutorial to understand it better.

Scroll to Top