mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-06-28 13:34:32 +08:00
Update db.InsertableByObject
This commit is contained in:
parent
067b200e6c
commit
e7441526f2
@ -8,8 +8,20 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
public class CommonMethodInfo
|
public class CommonMethodInfo
|
||||||
{
|
{
|
||||||
internal object Context { get; set; }
|
internal object Context { get; set; }
|
||||||
|
|
||||||
|
public int ExecuteReturnIdentity()
|
||||||
|
{
|
||||||
|
if (Context == null) return 0;
|
||||||
|
var result = Context.GetType().GetMyMethod("ExecuteReturnIdentity", 0).Invoke(Context, new object[] { });
|
||||||
|
return (int)result;
|
||||||
|
}
|
||||||
|
public async Task<int> ExecuteReturnIdentityAsync()
|
||||||
|
{
|
||||||
|
if (Context == null) return 0;
|
||||||
|
var result = Context.GetType().GetMyMethod("ExecuteReturnIdentityAsync", 0).Invoke(Context, new object[] { });
|
||||||
|
return await (Task<int>)result;
|
||||||
|
}
|
||||||
public int ExecuteCommand()
|
public int ExecuteCommand()
|
||||||
{
|
{
|
||||||
if (Context == null) return 0;
|
if (Context == null) return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user