From e46f215802315f454e0e19178711a2a43a16735f Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Sat, 3 Jun 2023 19:39:48 +0800 Subject: [PATCH] Update db.UpdateableByObject --- .../Abstract/UpdateProvider/UpdateMethodInfo.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Src/Asp.Net/SqlSugar/Abstract/UpdateProvider/UpdateMethodInfo.cs b/Src/Asp.Net/SqlSugar/Abstract/UpdateProvider/UpdateMethodInfo.cs index dd6a70b2d..23ab055c4 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/UpdateProvider/UpdateMethodInfo.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/UpdateProvider/UpdateMethodInfo.cs @@ -1,4 +1,5 @@ -using System; +using Microsoft.SqlServer.Server; +using System; using System.Collections; using System.Collections.Generic; using System.Reflection; @@ -28,7 +29,16 @@ namespace SqlSugar var result = inertable.GetType().GetMyMethod("ExecuteCommandAsync",0).Invoke(inertable, new object[] { }); return await (Task)result; } - + public CommonMethodInfo IgnoreColumns(params string[] ignoreColumns) + { + var inertable = MethodInfo.Invoke(Context, new object[] { objectValue }); + var newMethod = inertable.GetType().GetMyMethod("IgnoreColumns", 1,typeof(string[])); + var result = newMethod.Invoke(inertable, new object[] { ignoreColumns }); + return new CommonMethodInfo() + { + Context = result + }; + } public CommonMethodInfo SplitTable() { var inertable = MethodInfo.Invoke(Context, new object[] { objectValue });