diff --git a/src/ChloeDemo/User.cs b/src/ChloeDemo/User.cs index 46d08a6f..eeb2c568 100644 --- a/src/ChloeDemo/User.cs +++ b/src/ChloeDemo/User.cs @@ -1,6 +1,7 @@ using Chloe.Annotations; using Chloe.Entity; using Chloe.Oracle; +using Chloe.SqlServer; using System; using System.Collections.Generic; using System.Data; @@ -41,6 +42,10 @@ public class User : UserLite public int? Age { get; set; } public int? CityId { get; set; } public DateTime? OpTime { get; set; } + + /* Marks the column is timestamp type(sqlserver only) */ + //[Chloe.SqlServer.Annotations.TimestampAttribute] + //public Byte[] RowVersion { get; set; } } public class UserMapBase : EntityTypeBuilder where TUser : UserLite @@ -58,6 +63,9 @@ public UserMap() this.MapTo("Users"); this.Ignore(a => a.NotMapped); this.Property(a => a.Gender).HasDbType(DbType.Int32); + + /* Marks the column is timestamp type(sqlserver only) */ + //this.Property(a => a.RowVersion).IsTimestamp(); } }