mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-24 04:53:45 +08:00
Update dto
This commit is contained in:
@@ -807,12 +807,16 @@ namespace SqlSugar
|
|||||||
var changeValue = UtilMethods.ChangeType2(kv.Value, propertyInfo.PropertyType);
|
var changeValue = UtilMethods.ChangeType2(kv.Value, propertyInfo.PropertyType);
|
||||||
propertyInfo.SetValue(addItem, changeValue);
|
propertyInfo.SetValue(addItem, changeValue);
|
||||||
}
|
}
|
||||||
if (kv.Value ==DBNull.Value && UtilMethods.GetUnderType(propertyInfo.PropertyType).IsIn(typeof(int), typeof(long)))
|
if (kv.Value == DBNull.Value && UtilMethods.GetUnderType(propertyInfo.PropertyType).IsIn(typeof(int), typeof(long)))
|
||||||
{
|
{
|
||||||
|
|
||||||
var changeValue = UtilMethods.ChangeType2(0, propertyInfo.PropertyType);
|
var changeValue = UtilMethods.ChangeType2(0, propertyInfo.PropertyType);
|
||||||
propertyInfo.SetValue(addItem, changeValue);
|
propertyInfo.SetValue(addItem, changeValue);
|
||||||
}
|
}
|
||||||
|
else if (kv.Value == DBNull.Value)
|
||||||
|
{
|
||||||
|
propertyInfo.SetValue(addItem,null);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
propertyInfo.SetValue(addItem, kv.Value);
|
propertyInfo.SetValue(addItem, kv.Value);
|
||||||
|
Reference in New Issue
Block a user