1.修改判断bug

This commit is contained in:
tengfei8771 2023-06-14 15:05:30 +08:00
parent 5e8bbb54ba
commit 5ea43e5321

View File

@ -155,6 +155,10 @@ namespace SqlSugar
} }
public static bool IsIterator(this Type type) public static bool IsIterator(this Type type)
{ {
if (type.BaseType == null)
{
return false;
}
if (type.BaseType.IsGenericType) if (type.BaseType.IsGenericType)
{ {
return type.BaseType?.GetGenericTypeDefinition()?.FullName == "System.Linq.Enumerable+Iterator`1"; return type.BaseType?.GetGenericTypeDefinition()?.FullName == "System.Linq.Enumerable+Iterator`1";