mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-22 20:13:41 +08:00
InsertableByObject.EnableDiffLogEvent
UpdateableByObject.EnableDiffLogEvent
This commit is contained in:
@@ -60,6 +60,16 @@ namespace SqlSugar
|
||||
Context = result
|
||||
};
|
||||
}
|
||||
public CommonMethodInfo EnableDiffLogEvent(object businessData = null)
|
||||
{
|
||||
var inertable = MethodInfo.Invoke(Context, new object[] { objectValue });
|
||||
var newMethod = inertable.GetType().GetMyMethod("EnableDiffLogEvent", 1, typeof(object));
|
||||
var result = newMethod.Invoke(inertable, new object[] { businessData });
|
||||
return new CommonMethodInfo()
|
||||
{
|
||||
Context = result
|
||||
};
|
||||
}
|
||||
public CommonMethodInfo IgnoreColumns(params string [] ignoreColumns)
|
||||
{
|
||||
var inertable = MethodInfo.Invoke(Context, new object[] { objectValue });
|
||||
|
@@ -13,11 +13,11 @@ namespace SqlSugar
|
||||
internal MethodInfo MethodInfo { get; set; }
|
||||
internal object objectValue { get; set; }
|
||||
|
||||
public int ExecuteCommandWithOptLock(bool isThrowError = false)
|
||||
public int ExecuteCommandWithOptLock(bool isThrowError = false)
|
||||
{
|
||||
if (Context == null) return 0;
|
||||
var inertable = MethodInfo.Invoke(Context, new object[] { objectValue });
|
||||
var result = inertable.GetType().GetMyMethod("ExecuteCommandWithOptLock",1,typeof(bool)).Invoke(inertable, new object[] { isThrowError });
|
||||
var result = inertable.GetType().GetMyMethod("ExecuteCommandWithOptLock", 1, typeof(bool)).Invoke(inertable, new object[] { isThrowError });
|
||||
return (int)result;
|
||||
}
|
||||
|
||||
@@ -26,13 +26,13 @@ namespace SqlSugar
|
||||
if (Context == null) return 0;
|
||||
var inertable = MethodInfo.Invoke(Context, new object[] { objectValue });
|
||||
var result = inertable.GetType().GetMyMethod("ExecuteCommandWithOptLockAsync", 1, typeof(bool)).Invoke(inertable, new object[] { isThrowError });
|
||||
return await(Task<int>)result;
|
||||
return await (Task<int>)result;
|
||||
}
|
||||
public int ExecuteCommand()
|
||||
{
|
||||
if (Context == null) return 0;
|
||||
var inertable=MethodInfo.Invoke(Context, new object[] { objectValue });
|
||||
var result= inertable.GetType().GetMethod("ExecuteCommand").Invoke(inertable,new object[] { });
|
||||
var inertable = MethodInfo.Invoke(Context, new object[] { objectValue });
|
||||
var result = inertable.GetType().GetMethod("ExecuteCommand").Invoke(inertable, new object[] { });
|
||||
return (int)result;
|
||||
}
|
||||
|
||||
@@ -40,9 +40,23 @@ namespace SqlSugar
|
||||
{
|
||||
if (Context == null) return 0;
|
||||
var inertable = MethodInfo.Invoke(Context, new object[] { objectValue });
|
||||
var result = inertable.GetType().GetMyMethod("ExecuteCommandAsync",0).Invoke(inertable, new object[] { });
|
||||
var result = inertable.GetType().GetMyMethod("ExecuteCommandAsync", 0).Invoke(inertable, new object[] { });
|
||||
return await (Task<int>)result;
|
||||
}
|
||||
public UpdateCommonMethodInfo EnableDiffLogEvent(object businessData = null)
|
||||
{
|
||||
if(Context == null)
|
||||
{
|
||||
return new UpdateCommonMethodInfo();
|
||||
}
|
||||
var inertable = MethodInfo.Invoke(Context, new object[] { objectValue });
|
||||
var newMethod = inertable.GetType().GetMyMethod("EnableDiffLogEvent", 1, typeof(object));
|
||||
var result = newMethod.Invoke(inertable, new object[] { businessData });
|
||||
return new UpdateCommonMethodInfo()
|
||||
{
|
||||
Context = result
|
||||
};
|
||||
}
|
||||
public UpdateCommonMethodInfo IgnoreColumns(params string[] ignoreColumns)
|
||||
{
|
||||
if (Context == null)
|
||||
|
Reference in New Issue
Block a user