I have a SQL Server 2012 database. Each table has a set of audit fields. One is a column named RowVer with a datatype of timestamp (same as rowversion).
I'm having difficulty reading the value from a SqlDataReader into a C# object with a property named User.RowVersion with a datatype of Byte[].
Code Snippet of while (rdr.Read()) block
...
user.DateCreated = rdr.GetDateTime(14);
user.CreatedByUserId = rdr.GetInt32(15);
if (!rdr.IsDBNull(16)) { user.DateLastUpdated = rdr.GetDateTime(16); }
if (!rdr.IsDBNull(17)) { user.LastUpdatedByUserId = rdr.GetInt32(17); }
user.RowVersion = rdr.???;
...
The RowVersion value is only used as a comparison for concurrency when updating the database.
This of course is NOT an EF implementation.