diff --git a/Src/Asp.Net/KdbndpTest/Demo/DemoE_CodeFirst.cs b/Src/Asp.Net/KdbndpTest/Demo/DemoE_CodeFirst.cs index e5c40a4ba..4eff02374 100644 --- a/Src/Asp.Net/KdbndpTest/Demo/DemoE_CodeFirst.cs +++ b/Src/Asp.Net/KdbndpTest/Demo/DemoE_CodeFirst.cs @@ -45,9 +45,21 @@ namespace OrmTest { Name = "a" }).Where(it => it.Id != null).ExecuteCommand(); + db.CodeFirst.InitTables(); + db.Insertable(new List() { + new CodeFirstDFAAFA(){ timeOffset=DateTimeOffset.Now,timeOffset2=DateTimeOffset.Now }, + new CodeFirstDFAAFA() { timeOffset = DateTimeOffset.Now, timeOffset2 = DateTimeOffset.Now } + }).ExecuteCommand(); + Console.WriteLine("#### CodeFirst end ####"); } } + public class CodeFirstDFAAFA + { + public DateTimeOffset timeOffset{ get; set; } + [SugarColumn(ColumnDataType = "timestamp with time zone")] + public DateTimeOffset timeOffset2 { get; set; } + } public class CodeFirstNoUpper4 { [SugarColumn(IsPrimaryKey = true)]