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