From 901d1e75dbdbf3cd21dc3f0e95cee0880939ba2f Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Mon, 24 Oct 2022 13:05:09 +0800 Subject: [PATCH] Update db.UpdateNav --- .../Abstract/ExecuteNavProvider/UpdateNavManyToMany.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Src/Asp.Net/SqlSugar/Abstract/ExecuteNavProvider/UpdateNavManyToMany.cs b/Src/Asp.Net/SqlSugar/Abstract/ExecuteNavProvider/UpdateNavManyToMany.cs index 49da10015..591255824 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/ExecuteNavProvider/UpdateNavManyToMany.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/ExecuteNavProvider/UpdateNavManyToMany.cs @@ -39,6 +39,10 @@ namespace SqlSugar foreach (var item in parentList) { var items = parentNavigateProperty.PropertyInfo.GetValue(item); + if (items == null) + { + continue; + } var children = ((List)items); if (this._Options != null && this._Options.ManyToManyIsUpdateB) {