Browse Source

Update db.InsertableByObject

pull/33/head
sunkaixuan 1 year ago
parent
commit
e7441526f2
  1. 14
      Src/Asp.Net/SqlSugar/Abstract/DynamicBuilder/CommonMethodInfo.cs

14
Src/Asp.Net/SqlSugar/Abstract/DynamicBuilder/CommonMethodInfo.cs

@ -8,8 +8,20 @@ namespace SqlSugar
{
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()
{
if (Context == null) return 0;

Loading…
Cancel
Save