Skip to content

Commit

Permalink
update demo.
Browse files Browse the repository at this point in the history
  • Loading branch information
shuxinqin committed Mar 23, 2019
1 parent 419a90f commit 0f4803e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/ChloeDemo/User.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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<TUser> : EntityTypeBuilder<TUser> where TUser : UserLite
Expand All @@ -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();
}
}

Expand Down

0 comments on commit 0f4803e

Please sign in to comment.