Browse Source

Merge pull

SqlSugar5
sunkaixuan 2 years ago
parent
commit
a8fd79093c
  1. 5
      Src/Asp.Net/SqlSugar/Infrastructure/ContextMethods.cs

5
Src/Asp.Net/SqlSugar/Infrastructure/ContextMethods.cs

@ -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)
{

Loading…
Cancel
Save