mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-07-19 07:44:45 +08:00
Call method bug
This commit is contained in:
parent
ba9f414e7d
commit
eed19ae9d1
@ -203,12 +203,14 @@ namespace SqlSugar
|
|||||||
ThrowUpdateByExpression();
|
ThrowUpdateByExpression();
|
||||||
if (this.UpdateObjs.HasValue())
|
if (this.UpdateObjs.HasValue())
|
||||||
{
|
{
|
||||||
|
var oldColumns = this.UpdateBuilder.DbColumnInfoList.Select(it => it.PropertyName).ToList();
|
||||||
var expression = (LambdaExpression.Lambda(method).Body as LambdaExpression).Body;
|
var expression = (LambdaExpression.Lambda(method).Body as LambdaExpression).Body;
|
||||||
Check.Exception(!(expression is MethodCallExpression), method.ToString() + " is not method");
|
Check.Exception(!(expression is MethodCallExpression), method.ToString() + " is not method");
|
||||||
var callExpresion = expression as MethodCallExpression;
|
var callExpresion = expression as MethodCallExpression;
|
||||||
UtilMethods.DataInoveByExpresson(this.UpdateObjs, callExpresion);
|
UtilMethods.DataInoveByExpresson(this.UpdateObjs, callExpresion);
|
||||||
this.UpdateBuilder.DbColumnInfoList = new List<DbColumnInfo>();
|
this.UpdateBuilder.DbColumnInfoList = new List<DbColumnInfo>();
|
||||||
Init();
|
Init();
|
||||||
|
this.UpdateBuilder.DbColumnInfoList = this.UpdateBuilder.DbColumnInfoList.Where(it => oldColumns.Contains(it.PropertyName)).ToList();
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user