diff --git a/Src/Asp.NetCore2/SqlSeverTest/UnitTest/EntityInfoTest.cs b/Src/Asp.NetCore2/SqlSeverTest/UnitTest/EntityInfoTest.cs index 57ddf8c5e..d03cedc3b 100644 --- a/Src/Asp.NetCore2/SqlSeverTest/UnitTest/EntityInfoTest.cs +++ b/Src/Asp.NetCore2/SqlSeverTest/UnitTest/EntityInfoTest.cs @@ -44,10 +44,29 @@ namespace OrmTest || db.EntityMaintenance.GetEntityInfo().Columns.First().IsPrimarykey != true) { throw new Exception("unit error"); - } + } + db = NewUnitTest.Db; + + db.CodeFirst.InitTables(); + db.Insertable(new Unitadfafa11() { dob = 1.11 }).ExecuteCommand(); + db.Queryable() + .Select(IT => new Unitadfafa1DTO() + { + dob=(IT.dob??0).ToString("0.0") + }).ToList(); } } } + public class Unitadfafa1DTO + { + [SugarColumn(ColumnDataType = "double")] + public string dob { get; set; } + } + public class Unitadfafa11 + { + [SugarColumn(ColumnDataType = "float", IsNullable =true)] + public double? dob { get; set; } + } public class classTest { public string Id { get; set; }