Update: UpdateByObject

This commit is contained in:
sunkaixuan
2024-02-07 13:46:50 +08:00
parent 2e7cc41b98
commit 18822368ca
3 changed files with 21 additions and 1 deletions

View File

@@ -68,6 +68,15 @@ namespace SqlSugar
var result = Context.GetType().GetMyMethod("ExecuteCommandAsync", 0).Invoke(Context, new object[] { });
return await (Task<int>)result;
}
public UpdateCommonMethodInfo SplitTable()
{
var newMethod = this.Context.GetType().GetMyMethod("SplitTable", 0);
var result = newMethod.Invoke(Context, new object[] { });
return new UpdateCommonMethodInfo()
{
Context = result
};
}
}
}

View File

@@ -50,6 +50,17 @@ namespace SqlSugar
};
}
public UpdateCommonMethodInfo WhereColumns(params string[] whereColumns)
{
var inertable = MethodInfo.Invoke(Context, new object[] { objectValue });
var newMethod = inertable.GetType().GetMyMethod("WhereColumns", 1, typeof(string[]));
var result = newMethod.Invoke(inertable, new object[] { whereColumns });
return new UpdateCommonMethodInfo()
{
Context = result,
};
}
public UpdateCommonMethodInfo AS(string tableName)
{
var inertable = MethodInfo.Invoke(Context, new object[] { objectValue });

View File

@@ -2,7 +2,7 @@
<package >
<metadata>
<id>SqlSugarCore</id>
<version>5.1.4.141</version>
<version>5.1.4.142-preview02</version>
<authors>sunkaixuan</authors>
<owners>果糖大数据科技</owners>
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0.html</licenseUrl>