diff --git a/Src/Asp.Net/SqlServerTest/UnitTest/UCustom22.cs b/Src/Asp.Net/SqlServerTest/UnitTest/UCustom22.cs index 7abd99092..8b317b2c0 100644 --- a/Src/Asp.Net/SqlServerTest/UnitTest/UCustom22.cs +++ b/Src/Asp.Net/SqlServerTest/UnitTest/UCustom22.cs @@ -95,9 +95,25 @@ namespace OrmTest { throw new Exception("unit error"); } + + db.CodeFirst.InitTables(); + db.DbMaintenance.TruncateTable(); + db.Insertable(new UnitDecmaildfa() { Id = 1, Name = "a" }).ExecuteCommand(); + var x1=db.Storageable(new UnitDecmaildfa() { Id = 1, Name = "a" }).ToStorage(); + if (!x1.UpdateList.Any()) + { + throw new Exception("unit error"); + } + db.DbMaintenance.DropTable(); } + public class UnitDecmaildfa + { + [SqlSugar.SugarColumn(IsPrimaryKey =true)] + public decimal? Id { get; set; } + public string Name { get; set; } + } public static List Search(SqlSugarClient db) where T : ISearch