From a3d3b3a8aed0ce0242f17aa3d87a9f628a28c725 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Fri, 11 Aug 2023 16:14:11 +0800 Subject: [PATCH] Add unit test --- Src/Asp.NetCore2/KdbndpTest/UnitTest/UCodeFirst.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Src/Asp.NetCore2/KdbndpTest/UnitTest/UCodeFirst.cs b/Src/Asp.NetCore2/KdbndpTest/UnitTest/UCodeFirst.cs index 099832be8..9699db63b 100644 --- a/Src/Asp.NetCore2/KdbndpTest/UnitTest/UCodeFirst.cs +++ b/Src/Asp.NetCore2/KdbndpTest/UnitTest/UCodeFirst.cs @@ -1,4 +1,5 @@ -using System; +using SqlSugar; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -13,12 +14,13 @@ namespace OrmTest if (Db.DbMaintenance.IsAnyTable("UnitCodeTest1", false)) Db.DbMaintenance.DropTable("UnitCodeTest1"); Db.CodeFirst.InitTables(); + Db.CodeFirst.InitTables(); } + [SugarIndex("IndexUnitCodeTest1_CreateDate", nameof(CreateDate),OrderByType.Desc)] public class UnitCodeTest1 { - [SqlSugar.SugarColumn(IndexGroupNameList = new string[] { "group1" })] public int Id { get; set; } - [SqlSugar.SugarColumn(DefaultValue= "now()", IndexGroupNameList =new string[] {"group1" } )] + [SqlSugar.SugarColumn(DefaultValue= "now()" )] public DateTime? CreateDate { get; set; } } }