As described in #5936, mapping a ulong with a store type of "rowversion" (or "timestamp") results in a rowversion column in SQL Server that can be used effectively in LINQ queries. This should also work for cases like this:
public class Blog
{
public int Id { get; set; }
public ulong RowVersion { get; set; }
}
modelBuilder
.Entity<Blog>()
.Property(e => e.RowVersion)
.HasConversion<byte[]>()
.IsRowVersion();
and this:
public class Blog
{
public int Id { get; set; }
[Timestamp]
public ulong RowVersion { get; set; }
}
modelBuilder
.Entity<Blog>()
.Property(e => e.RowVersion)
.HasConversion<byte[]>();
And possibly even when .HasConversion<byte[]>() is not used explicitly, since IsRowVersion or [Timestamp] imply this, at least for SQL Server