This commit is contained in:
skx 2021-02-04 23:17:13 +08:00
parent e155259e78
commit 2b4ae48f4a
2 changed files with 2 additions and 2 deletions

View File

@ -332,7 +332,7 @@ namespace SqlSugar
var data = dr.GetString(i);
if (data.ToString() == "")
{
return UtilMethods.To<T>(null);
return UtilMethods.To<T>(default(T));
}
else
{

View File

@ -80,7 +80,7 @@ namespace OrmTest
}, o => o.OrderSn == saleOrderInfo.OrderSn && o.OrderStatus != 1);
Db.CodeFirst.InitTables<UnitAbc121>();
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<UnitAbc121>().ToList();
}