mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-23 12:33:44 +08:00
Update Core
This commit is contained in:
@@ -217,6 +217,10 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
method = isNullableType ? getConvertByte : getByte;
|
method = isNullableType ? getConvertByte : getByte;
|
||||||
}
|
}
|
||||||
|
else if (bindPropertyType == UtilConstants.StringType&&dbTypeName?.ToLower()== "timestamp")
|
||||||
|
{
|
||||||
|
method = getConvertValueMethod.MakeGenericMethod(columnInfo.PropertyInfo.PropertyType); ;
|
||||||
|
}
|
||||||
else if (bindPropertyType == UtilConstants.StringType)
|
else if (bindPropertyType == UtilConstants.StringType)
|
||||||
{
|
{
|
||||||
method = getString;
|
method = getString;
|
||||||
|
@@ -137,6 +137,8 @@ namespace SqlSugar
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
public static T GetConvertValue<T>(this IDataRecord dr, int i)
|
public static T GetConvertValue<T>(this IDataRecord dr, int i)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
if (dr.IsDBNull(i))
|
if (dr.IsDBNull(i))
|
||||||
{
|
{
|
||||||
@@ -145,6 +147,15 @@ namespace SqlSugar
|
|||||||
var result = dr.GetValue(i);
|
var result = dr.GetValue(i);
|
||||||
return UtilMethods.To<T>(result);
|
return UtilMethods.To<T>(result);
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
if (dr.GetFieldType(i) == UtilConstants.DateType)
|
||||||
|
{
|
||||||
|
return UtilMethods.To<T>(dr.GetConvertDouble(i));
|
||||||
|
}
|
||||||
|
throw new Exception(ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static long? GetConvetInt64(this IDataRecord dr, int i)
|
public static long? GetConvetInt64(this IDataRecord dr, int i)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user