mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-22 20:13:41 +08:00
BugFix: 如果是 int? 类型, 要判断值!=null 之后, 才能调用ObjToInt扩展方法.
This commit is contained in:
@@ -456,9 +456,12 @@ namespace SqlSugar
|
||||
var addItem = readerValues[info];
|
||||
if (addItem == DBNull.Value)
|
||||
addItem = null;
|
||||
if (UtilMethods.GetUnderType(prop.PropertyType) == UtilConstants.IntType)
|
||||
if (prop.PropertyType == UtilConstants.IntType )
|
||||
{
|
||||
addItem = addItem.ObjToInt();
|
||||
} else if (UtilMethods.GetUnderType(prop.PropertyType) == UtilConstants.IntType && addItem != null)
|
||||
{
|
||||
addItem= addItem.ObjToInt();
|
||||
}
|
||||
else if (prop.PropertyType.IsEnum()&&addItem is decimal)
|
||||
{
|
||||
|
Reference in New Issue
Block a user