mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2026-01-23 21:32:04 +08:00
Add : db.InsertByObject(type).ExecuteReturnSnowflakeIdAsync()
This commit is contained in:
@@ -73,5 +73,20 @@ namespace SqlSugar
|
|||||||
Context = result
|
Context = result
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public long ExecuteReturnSnowflakeId()
|
||||||
|
{
|
||||||
|
if (Context == null) return 0;
|
||||||
|
var inertable = MethodInfo.Invoke(Context, new object[] { objectValue });
|
||||||
|
var result = inertable.GetType().GetMethod("ExecuteReturnSnowflakeId").Invoke(inertable, new object[] { });
|
||||||
|
return (long)result;
|
||||||
|
}
|
||||||
|
public async Task<long> ExecuteReturnSnowflakeIdAsync()
|
||||||
|
{
|
||||||
|
if (Context == null) return 0;
|
||||||
|
var inertable = MethodInfo.Invoke(Context, new object[] { objectValue });
|
||||||
|
var result = inertable.GetType().GetMyMethod("ExecuteReturnSnowflakeIdAsync", 0).Invoke(inertable, new object[] { });
|
||||||
|
return await (Task<long>)result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user