Merge pull request #1092 from lileyzhao/master

修复 `Guid?` 类型转换问题
This commit is contained in:
果糖网
2022-10-27 16:22:26 +08:00
committed by GitHub

View File

@@ -370,6 +370,7 @@ namespace SqlSugar
else
return Enum.ToObject(type, value);
}
if (value is string && type == typeof(Guid?)) return value.IsNullOrEmpty() ? null : (Guid?)new Guid(value as string);
if (!type.IsInterface && type.IsGenericType)
{
Type innerType = type.GetGenericArguments()[0];