From 5dfbfb7b7b7394ad866826707f81337a8abc7b3f Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Mon, 29 Aug 2022 11:56:21 +0800 Subject: [PATCH] Add unit test --- Src/Asp.Net/PgSqlTest/UnitTest/UCodeFirst.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Src/Asp.Net/PgSqlTest/UnitTest/UCodeFirst.cs b/Src/Asp.Net/PgSqlTest/UnitTest/UCodeFirst.cs index b1ec3e758..b6abb98d9 100644 --- a/Src/Asp.Net/PgSqlTest/UnitTest/UCodeFirst.cs +++ b/Src/Asp.Net/PgSqlTest/UnitTest/UCodeFirst.cs @@ -47,6 +47,16 @@ namespace OrmTest Db.Insertable(new UnitCodeFirst131() { Id = 1 }).ExecuteCommand(); Db.CodeFirst.InitTables(); Db.CodeFirst.InitTables(); + Db.CodeFirst.InitTables(); + } + [SugarTable("test_tbl")] + public class TestTbl + { + [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)] + public long Id { get; set; } + + [SugarColumn(ColumnName = "birthday", IsNullable = true, DefaultValue = "1900-01-01")] + public DateTime Birthday { get; set; } } public class UnitCodeFirst131 {