Skip to content

Commit 0f4803e

Browse files
author
shuxinqin
committed
update demo.
1 parent 419a90f commit 0f4803e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/ChloeDemo/User.cs

+8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using Chloe.Annotations;
22
using Chloe.Entity;
33
using Chloe.Oracle;
4+
using Chloe.SqlServer;
45
using System;
56
using System.Collections.Generic;
67
using System.Data;
@@ -41,6 +42,10 @@ public class User : UserLite
4142
public int? Age { get; set; }
4243
public int? CityId { get; set; }
4344
public DateTime? OpTime { get; set; }
45+
46+
/* Marks the column is timestamp type(sqlserver only) */
47+
//[Chloe.SqlServer.Annotations.TimestampAttribute]
48+
//public Byte[] RowVersion { get; set; }
4449
}
4550

4651
public class UserMapBase<TUser> : EntityTypeBuilder<TUser> where TUser : UserLite
@@ -58,6 +63,9 @@ public UserMap()
5863
this.MapTo("Users");
5964
this.Ignore(a => a.NotMapped);
6065
this.Property(a => a.Gender).HasDbType(DbType.Int32);
66+
67+
/* Marks the column is timestamp type(sqlserver only) */
68+
//this.Property(a => a.RowVersion).IsTimestamp();
6169
}
6270
}
6371

0 commit comments

Comments
 (0)