From 34c72c089251b7600cd4386a0c687455a157a25a Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Sat, 23 Apr 2022 15:48:06 +0800 Subject: [PATCH] Update unit test --- Src/Asp.Net/PgSqlTest/UnitTest/UCodeFirst.cs | 24 ++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Src/Asp.Net/PgSqlTest/UnitTest/UCodeFirst.cs b/Src/Asp.Net/PgSqlTest/UnitTest/UCodeFirst.cs index 9ac60522e..b1ec3e758 100644 --- a/Src/Asp.Net/PgSqlTest/UnitTest/UCodeFirst.cs +++ b/Src/Asp.Net/PgSqlTest/UnitTest/UCodeFirst.cs @@ -41,6 +41,30 @@ namespace OrmTest if (Db.DbMaintenance.IsAnyTable("User", false)) Db.DbMaintenance.DropTable("User"); Db.CodeFirst.InitTables(); + if (Db.DbMaintenance.IsAnyTable("UnitCodeFirst131", false)) + Db.DbMaintenance.DropTable("UnitCodeFirst131"); + Db.CodeFirst.InitTables(); + Db.Insertable(new UnitCodeFirst131() { Id = 1 }).ExecuteCommand(); + Db.CodeFirst.InitTables(); + Db.CodeFirst.InitTables(); + } + public class UnitCodeFirst131 + { + public int Id { get; set; } + } + public class UNITCODEFIRST131 + { + public int Id { get; set; } + [SqlSugar.SugarColumn(DefaultValue = "a")] + public string Name { get; set; } + } + public class UNITCOdEFIRST131 + { + public int Id { get; set; } + [SqlSugar.SugarColumn(DefaultValue = "a")] + public string Name { get; set; } + [SqlSugar.SugarColumn(DefaultValue = "0")] + public int dt { get; set; } } public class User {