修复映射实体时IL错误

This commit is contained in:
悦欣 张 2019-07-05 18:30:29 +08:00
parent 6bf1cf0845
commit a58ec3b6a5

View File

@ -207,6 +207,10 @@ namespace SqlSugar
{
method = getConvertValueMethod.MakeGenericMethod(columnInfo.PropertyInfo.PropertyType);
}
if (method.IsVirtual)
generator.Emit(OpCodes.Callvirt, method);
else
generator.Emit(OpCodes.Call, method);
return;
};
@ -313,6 +317,9 @@ namespace SqlSugar
if (method == null)
method = isNullableType ? getOtherNull.MakeGenericMethod(bindPropertyType) : getOther.MakeGenericMethod(bindPropertyType);
if (method.IsVirtual)
generator.Emit(OpCodes.Callvirt, method);
else
generator.Emit(OpCodes.Call, method);
#endregion
}