Synchronization code

This commit is contained in:
sunkaixuan
2023-05-10 14:26:17 +08:00
parent e050b2ecbb
commit d17e433c22

View File

@@ -54,7 +54,14 @@ namespace SqlSugar
if (propertyInfo != null) if (propertyInfo != null)
{ {
// 如果找到了该属性,则将其值设置为字典中对应的值 // 如果找到了该属性,则将其值设置为字典中对应的值
propertyInfo.SetValue(obj, Convert.ChangeType(pair.Value, propertyInfo.PropertyType)); if (pair.Value == null)
{
propertyInfo.SetValue(obj, UtilMethods.ChangeType2(pair.Value, propertyInfo.PropertyType));
}
else
{
propertyInfo.SetValue(obj, Convert.ChangeType(pair.Value, propertyInfo.PropertyType));
}
} }
} }