From e18ce0faa7cfa753e4a7870e52bc1525db139691 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Tue, 20 Jun 2023 21:22:09 +0800 Subject: [PATCH] Add unit test --- Src/Asp.Net/PgSqlTest/Demo/DemoE_CodeFirst.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Src/Asp.Net/PgSqlTest/Demo/DemoE_CodeFirst.cs b/Src/Asp.Net/PgSqlTest/Demo/DemoE_CodeFirst.cs index b832c6702..de7d6d1ac 100644 --- a/Src/Asp.Net/PgSqlTest/Demo/DemoE_CodeFirst.cs +++ b/Src/Asp.Net/PgSqlTest/Demo/DemoE_CodeFirst.cs @@ -82,9 +82,15 @@ namespace OrmTest db.Insertable(new CodeFloatddfa1a2() { xx = DateTimeOffset.Now }).ExecuteCommand(); db.Insertable(new List { new CodeFloatddfa1a2() { xx = DateTimeOffset.Now }, new CodeFloatddfa1a2() { xx = DateTimeOffset.Now } }).ExecuteCommand(); db.CodeFirst.InitTables(); + db.CodeFirst.InitTables(); Console.WriteLine("#### CodeFirst end ####"); } } + public class CodeFirstadfa + { + [SugarColumn(IsNullable = true, DefaultValue = "CURRENT_TIMESTAMP")] + public DateTime CreateTime { get; set; } = DateTime.Now; + } [SugarTable("TNL_Tunnel1")] public class Area