Update db.UpdateByObject

This commit is contained in:
sunkaixuan
2025-11-07 12:27:14 +08:00
parent a3674fe5fe
commit 848abfa7e5
3 changed files with 20 additions and 2 deletions

View File

@@ -69,6 +69,14 @@ namespace SqlSugar
updateCommonMethod.Context = result;
return updateCommonMethod;
}
public UpdateCommonMethodInfo EnableQueryFilter()
{
var result = Context.GetType().GetMyMethod("EnableQueryFilter", 0).Invoke(Context, new object[] { });
UpdateCommonMethodInfo updateCommonMethod = new UpdateCommonMethodInfo();
updateCommonMethod.Context = result;
return updateCommonMethod;
}
public UpdateCommonMethodInfo UpdateColumns(params string[] columns)
{
var result = Context.GetType().GetMyMethod("UpdateColumns", 1, typeof(string[])).Invoke(Context, new object[] { columns });

View File

@@ -123,5 +123,15 @@ namespace SqlSugar
Context = result
};
}
public UpdateCommonMethodInfo PageSize(int pageSize)
{
var inertable = MethodInfo.Invoke(Context, new object[] { objectValue });
var newMethod = inertable.GetType().GetMyMethod("PageSize", 1,typeof(int));
var result = newMethod.Invoke(inertable, new object[] { pageSize });
return new UpdateCommonMethodInfo()
{
Context = result
};
}
}
}

View File

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