mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-24 07:22:57 +08:00
Update SqlSugar CommonPropertyConvert
This commit is contained in:
parent
7b311ae1e3
commit
cbbbfc049f
@ -63,8 +63,14 @@ namespace SqlSugar.DbConvert
|
|||||||
public T QueryConverter<T>(IDataRecord dr, int i)
|
public T QueryConverter<T>(IDataRecord dr, int i)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
var value = dr.GetValue(i);
|
var value = dr.GetValue(i);
|
||||||
|
if (value is byte[] && typeof(T) != UtilConstants.ByteArrayType)
|
||||||
|
{
|
||||||
|
value = Encoding.UTF8.GetString((byte[])value);
|
||||||
|
}
|
||||||
return (T)UtilMethods.ChangeType2(value, typeof(T));
|
return (T)UtilMethods.ChangeType2(value, typeof(T));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user