mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-11-18 16:59:03 +08:00
Update UtilMethods
This commit is contained in:
@@ -606,6 +606,10 @@ namespace SqlSugar
|
||||
return result;
|
||||
}
|
||||
}
|
||||
else if (value is byte[] && destinationType == typeof(char))
|
||||
{
|
||||
return (char)((byte[])value)[0];
|
||||
}
|
||||
var destinationConverter = TypeDescriptor.GetConverter(destinationType);
|
||||
if (destinationConverter != null && destinationConverter.CanConvertFrom(value.GetType()))
|
||||
return destinationConverter.ConvertFrom(null, culture, value);
|
||||
|
||||
Reference in New Issue
Block a user