diff --git a/Src/Asp.NetCore2/Net7Test/NET7Test/NET7Test/Program.cs b/Src/Asp.NetCore2/Net7Test/NET7Test/NET7Test/Program.cs index eec97a83d..9d566af7b 100644 --- a/Src/Asp.NetCore2/Net7Test/NET7Test/NET7Test/Program.cs +++ b/Src/Asp.NetCore2/Net7Test/NET7Test/NET7Test/Program.cs @@ -1,5 +1,6 @@ using NET7Test; using SqlSugar; +using SqlSugar.DbConvert; ServerTest(); SqliteTest(); @@ -98,6 +99,16 @@ static void ServerTest() //测试demo3, 5.1.3.47版本不成功, 5.0.9.6版本成功 Dictionary data3 = System.Text.Json.JsonSerializer.Deserialize>(json); sqlugar.Insertable(data3).AS("Userinfo021").ExecuteReturnBigIdentity(); + + if (sqlugar.DbMaintenance.IsAnyTable("Unitadfafa", false)) + { + sqlugar.DbMaintenance.DropTable(); + } + sqlugar.CodeFirst.InitTables(); + + sqlugar.Insertable(new Unitadfafa() { Id =1 }).ExecuteCommand(); + var list2=sqlugar.Queryable().ToList(); + } @@ -128,6 +139,13 @@ static void SqliteTest() var d2 = new UnitDate01231().timeOnly; } + +public class Unitadfafa +{ + [SugarColumn(SqlParameterDbType =typeof(CommonPropertyConvert))] + public int Id { get; set; } +} + public class UnitDate01231 { [SugarColumn(ColumnDataType = "time")]