diff --git a/Src/Asp.NetCore2/SqlSugar/Abstract/DeleteProvider/DeleteMethodInfo.cs b/Src/Asp.NetCore2/SqlSugar/Abstract/DeleteProvider/DeleteMethodInfo.cs index b49d1672b..104438f41 100644 --- a/Src/Asp.NetCore2/SqlSugar/Abstract/DeleteProvider/DeleteMethodInfo.cs +++ b/Src/Asp.NetCore2/SqlSugar/Abstract/DeleteProvider/DeleteMethodInfo.cs @@ -27,5 +27,16 @@ namespace SqlSugar var result = inertable.GetType().GetMyMethod("ExecuteCommandAsync",0).Invoke(inertable, new object[] { }); return await(Task)result; } + + public CommonMethodInfo SplitTable() + { + var inertable = MethodInfo.Invoke(Context, new object[] { objectValue }); + var newMethod = inertable.GetType().GetMyMethod("SplitTable", 0); + var result = newMethod.Invoke(inertable, new object[] { }); + return new CommonMethodInfo() + { + Context = result + }; + } } } diff --git a/Src/Asp.NetCore2/SqlSugar/Abstract/DynamicBuilder/CommonMethodInfo.cs b/Src/Asp.NetCore2/SqlSugar/Abstract/DynamicBuilder/CommonMethodInfo.cs new file mode 100644 index 000000000..de48a800c --- /dev/null +++ b/Src/Asp.NetCore2/SqlSugar/Abstract/DynamicBuilder/CommonMethodInfo.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace SqlSugar +{ + public class CommonMethodInfo + { + internal object Context { get; set; } + + public int ExecuteCommand() + { + if (Context == null) return 0; + var result = Context.GetType().GetMyMethod("ExecuteCommand", 0).Invoke(Context, new object[] { }); + return (int)result; + } + public async Task ExecuteCommandAsync() + { + if (Context == null) return 0; + var result = Context.GetType().GetMyMethod("ExecuteCommandAsync", 0).Invoke(Context, new object[] { }); + return await (Task)result; + } + } + +} diff --git a/Src/Asp.NetCore2/SqlSugar/Abstract/InsertableProvider/InsertMethodInfo.cs b/Src/Asp.NetCore2/SqlSugar/Abstract/InsertableProvider/InsertMethodInfo.cs index dfff07e7d..597bcda83 100644 --- a/Src/Asp.NetCore2/SqlSugar/Abstract/InsertableProvider/InsertMethodInfo.cs +++ b/Src/Asp.NetCore2/SqlSugar/Abstract/InsertableProvider/InsertMethodInfo.cs @@ -41,5 +41,15 @@ namespace SqlSugar var result = inertable.GetType().GetMyMethod("ExecuteReturnIdentityAsync",0).Invoke(inertable, new object[] { }); return await (Task)result; } + public CommonMethodInfo SplitTable() + { + var inertable = MethodInfo.Invoke(Context, new object[] { objectValue }); + var newMethod = inertable.GetType().GetMyMethod("SplitTable", 0); + var result = newMethod.Invoke(inertable, new object[] { }); + return new CommonMethodInfo() + { + Context = result + }; + } } } diff --git a/Src/Asp.NetCore2/SqlSugar/Abstract/UpdateProvider/UpdateMethodInfo.cs b/Src/Asp.NetCore2/SqlSugar/Abstract/UpdateProvider/UpdateMethodInfo.cs index 170aafe83..dd6a70b2d 100644 --- a/Src/Asp.NetCore2/SqlSugar/Abstract/UpdateProvider/UpdateMethodInfo.cs +++ b/Src/Asp.NetCore2/SqlSugar/Abstract/UpdateProvider/UpdateMethodInfo.cs @@ -28,5 +28,16 @@ namespace SqlSugar var result = inertable.GetType().GetMyMethod("ExecuteCommandAsync",0).Invoke(inertable, new object[] { }); return await (Task)result; } + + public CommonMethodInfo SplitTable() + { + var inertable = MethodInfo.Invoke(Context, new object[] { objectValue }); + var newMethod = inertable.GetType().GetMyMethod("SplitTable", 0); + var result = newMethod.Invoke(inertable, new object[] { }); + return new CommonMethodInfo() + { + Context = result + }; + } } }