mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-03 12:18:00 +08:00
Synchronization code
This commit is contained in:
parent
f4fda709c6
commit
0906ae8ecf
@ -27,5 +27,16 @@ namespace SqlSugar
|
||||
var result = inertable.GetType().GetMyMethod("ExecuteCommandAsync",0).Invoke(inertable, new object[] { });
|
||||
return await(Task<int>)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
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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<int> ExecuteCommandAsync()
|
||||
{
|
||||
if (Context == null) return 0;
|
||||
var result = Context.GetType().GetMyMethod("ExecuteCommandAsync", 0).Invoke(Context, new object[] { });
|
||||
return await (Task<int>)result;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -41,5 +41,15 @@ namespace SqlSugar
|
||||
var result = inertable.GetType().GetMyMethod("ExecuteReturnIdentityAsync",0).Invoke(inertable, new object[] { });
|
||||
return await (Task<int>)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
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -28,5 +28,16 @@ namespace SqlSugar
|
||||
var result = inertable.GetType().GetMyMethod("ExecuteCommandAsync",0).Invoke(inertable, new object[] { });
|
||||
return await (Task<int>)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
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -88,6 +88,7 @@
|
||||
<Compile Include="Abstract\DeleteProvider\LogicDeleteProvider.cs" />
|
||||
<Compile Include="Abstract\DeleteProvider\SplitTableDeleteByObjectProvider.cs" />
|
||||
<Compile Include="Abstract\DeleteProvider\SplitTableDeleteProvider.cs" />
|
||||
<Compile Include="Abstract\DynamicBuilder\CommonMethodInfo.cs" />
|
||||
<Compile Include="Abstract\DynamicBuilder\DynamicProperyBuilder.cs" />
|
||||
<Compile Include="Abstract\DynamicBuilder\Helper.cs" />
|
||||
<Compile Include="Abstract\DynamicBuilder\EmitTool.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user