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
|
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)
|
public CommonMethodInfo IgnoreColumns(params string [] ignoreColumns)
|
||||||
{
|
{
|
||||||
var inertable = MethodInfo.Invoke(Context, new object[] { objectValue });
|
var inertable = MethodInfo.Invoke(Context, new object[] { objectValue });
|
||||||
|
@@ -17,7 +17,7 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
if (Context == null) return 0;
|
if (Context == null) return 0;
|
||||||
var inertable = MethodInfo.Invoke(Context, new object[] { objectValue });
|
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;
|
return (int)result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -26,13 +26,13 @@ namespace SqlSugar
|
|||||||
if (Context == null) return 0;
|
if (Context == null) return 0;
|
||||||
var inertable = MethodInfo.Invoke(Context, new object[] { objectValue });
|
var inertable = MethodInfo.Invoke(Context, new object[] { objectValue });
|
||||||
var result = inertable.GetType().GetMyMethod("ExecuteCommandWithOptLockAsync", 1, typeof(bool)).Invoke(inertable, new object[] { isThrowError });
|
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()
|
public int ExecuteCommand()
|
||||||
{
|
{
|
||||||
if (Context == null) return 0;
|
if (Context == null) return 0;
|
||||||
var inertable=MethodInfo.Invoke(Context, new object[] { objectValue });
|
var inertable = MethodInfo.Invoke(Context, new object[] { objectValue });
|
||||||
var result= inertable.GetType().GetMethod("ExecuteCommand").Invoke(inertable,new object[] { });
|
var result = inertable.GetType().GetMethod("ExecuteCommand").Invoke(inertable, new object[] { });
|
||||||
return (int)result;
|
return (int)result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -40,9 +40,23 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
if (Context == null) return 0;
|
if (Context == null) return 0;
|
||||||
var inertable = MethodInfo.Invoke(Context, new object[] { objectValue });
|
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;
|
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)
|
public UpdateCommonMethodInfo IgnoreColumns(params string[] ignoreColumns)
|
||||||
{
|
{
|
||||||
if (Context == null)
|
if (Context == null)
|
||||||
|
Reference in New Issue
Block a user