diff --git a/Src/Asp.Net/DmTest/Demo/DemoE_CodeFirst.cs b/Src/Asp.Net/DmTest/Demo/DemoE_CodeFirst.cs index 65a9011a6..4e67d0927 100644 --- a/Src/Asp.Net/DmTest/Demo/DemoE_CodeFirst.cs +++ b/Src/Asp.Net/DmTest/Demo/DemoE_CodeFirst.cs @@ -27,6 +27,11 @@ namespace OrmTest } } }); + db.CodeFirst.InitTables(); + db.Insertable(new List() { + new CodeFirstDFAAFA(){ timeOffset=DateTimeOffset.Now,timeOffset2=DateTimeOffset.Now }, + new CodeFirstDFAAFA() { timeOffset = DateTimeOffset.Now, timeOffset2 = DateTimeOffset.Now } + }).ExecuteCommand(); // db.DbMaintenance.CreateDatabase(); if (db.DbMaintenance.IsAnyTable("CodeFirstTable1", false)) db.DbMaintenance.DropTable("CodeFirstTable1"); @@ -57,6 +62,12 @@ namespace OrmTest 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 CodeFirstadfafa { public string index { get; set; }