EF 6.1, I have the following:
public partial class DepartmentEFEntity { Guid DepartmentUUID { get; set; } public byte[] TheVersionProperty { get; set; } }
and then:
modelBuilder.Entity<DepartmentEFEntity>().Property(o => o.TheVersionProperty).HasColumnType("timestamp").HasDatabaseGeneratedOption(DatabaseGeneratedOption.Computed).IsRowVersion();
When I script out of the table, I get the following:
CREATE TABLE [dbo].[Department]( [DepartmentUUID] [uniqueidentifier] NOT NULL, [TheVersionProperty] [timestamp] NOT NULL )
source share