From 5ea43e5321a27eedd6b4df278b26c5f92728107e Mon Sep 17 00:00:00 2001 From: tengfei8771 <532050072@qq.com> Date: Wed, 14 Jun 2023 15:05:30 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E5=88=A4=E6=96=ADbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Src/Asp.NetCore2/SqlSugar/Utilities/ValidateExtensions.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Src/Asp.NetCore2/SqlSugar/Utilities/ValidateExtensions.cs b/Src/Asp.NetCore2/SqlSugar/Utilities/ValidateExtensions.cs index 9bdf780fc..975f0aa97 100644 --- a/Src/Asp.NetCore2/SqlSugar/Utilities/ValidateExtensions.cs +++ b/Src/Asp.NetCore2/SqlSugar/Utilities/ValidateExtensions.cs @@ -155,6 +155,10 @@ namespace SqlSugar } public static bool IsIterator(this Type type) { + if (type.BaseType == null) + { + return false; + } if (type.BaseType.IsGenericType) { return type.BaseType?.GetGenericTypeDefinition()?.FullName == "System.Linq.Enumerable+Iterator`1";