diff --git a/Src/Asp.Net/SqlSugar/Abstract/DbBindProvider/IDataRecordExtensions.cs b/Src/Asp.Net/SqlSugar/Abstract/DbBindProvider/IDataRecordExtensions.cs index cbceeb8b1..836c5af5a 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/DbBindProvider/IDataRecordExtensions.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/DbBindProvider/IDataRecordExtensions.cs @@ -332,7 +332,7 @@ namespace SqlSugar var data = dr.GetString(i); if (data.ToString() == "") { - return UtilMethods.To(null); + return UtilMethods.To(default(T)); } else { diff --git a/Src/Asp.Net/SqliteTest/UnitTest/UQueryable.cs b/Src/Asp.Net/SqliteTest/UnitTest/UQueryable.cs index ff6775053..9309ded72 100644 --- a/Src/Asp.Net/SqliteTest/UnitTest/UQueryable.cs +++ b/Src/Asp.Net/SqliteTest/UnitTest/UQueryable.cs @@ -80,7 +80,7 @@ namespace OrmTest }, o => o.OrderSn == saleOrderInfo.OrderSn && o.OrderStatus != 1); Db.CodeFirst.InitTables(); - Db.Insertable(new UnitAbc121() { name="a" }).ExecuteCommand(); + Db.Insertable(new UnitAbc121() { name="a",uid=null }).ExecuteCommand(); Db.Insertable(new UnitAbc121() { name = "a", uid=Guid.NewGuid() }).ExecuteCommand(); var list10= Db.Queryable().ToList(); }