mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-11-24 08:33:16 +08:00
Update db.UpdateByObject
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SqlSugar
|
||||
{
|
||||
@@ -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 });
|
||||
|
||||
@@ -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
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user