mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2026-01-23 21:32:04 +08:00
Update SqlSugar : UtilMethods
This commit is contained in:
@@ -750,6 +750,10 @@ namespace SqlSugar
|
||||
}
|
||||
public static object ChangeType2(object value, Type type)
|
||||
{
|
||||
if (value is byte[]&&type==UtilConstants.StringType)
|
||||
{
|
||||
return Encoding.UTF8.GetString(value as byte[]);
|
||||
}
|
||||
if (value == null && type.IsGenericType) return Activator.CreateInstance(type);
|
||||
if (value == null) return null;
|
||||
if (type == value.GetType()) return value;
|
||||
|
||||
Reference in New Issue
Block a user