From 66240f744cda96a98e1e4f2ca6f707e004eb8742 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Tue, 27 Dec 2022 13:25:43 +0800 Subject: [PATCH] Update db.DeleteByObject --- Src/Asp.Net/SqlSugar/Abstract/SugarProvider/SqlSugarProvider.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/Asp.Net/SqlSugar/Abstract/SugarProvider/SqlSugarProvider.cs b/Src/Asp.Net/SqlSugar/Abstract/SugarProvider/SqlSugarProvider.cs index 4576c9d7f..9f8c2ada1 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/SugarProvider/SqlSugarProvider.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/SugarProvider/SqlSugarProvider.cs @@ -787,7 +787,7 @@ namespace SqlSugar .Where(it => it.GetGenericArguments().Any()) .Where(it => it.GetParameters().Any(z => z.ParameterType.Name.StartsWith("List"))) .Where(it => it.Name == "Deleteable").ToList(); - var method = methods.Single().MakeGenericMethod(newList.GetType().GetGenericArguments().FirstOrDefault()); + var method = methods.FirstOrDefault().MakeGenericMethod(newList.GetType().GetGenericArguments().FirstOrDefault()); DeleteMethodInfo result = new DeleteMethodInfo() { Context = this.Context,