Update SqlSugar CommonPropertyConvert

This commit is contained in:
sunkaixuan 2023-12-23 17:22:50 +08:00
parent 7b311ae1e3
commit cbbbfc049f

View File

@ -63,8 +63,14 @@ namespace SqlSugar.DbConvert
public T QueryConverter<T>(IDataRecord dr, int 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));
}
}