mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-17 21:49:33 +08:00
CallMethod bug
This commit is contained in:
parent
eed19ae9d1
commit
0c0da83ef2
@ -841,12 +841,14 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
if (this.InsertObjs.HasValue())
|
if (this.InsertObjs.HasValue())
|
||||||
{
|
{
|
||||||
|
var oldColumns = this.InsertBuilder.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.InsertObjs,callExpresion);
|
UtilMethods.DataInoveByExpresson(this.InsertObjs,callExpresion);
|
||||||
this.InsertBuilder.DbColumnInfoList = new List<DbColumnInfo>();
|
this.InsertBuilder.DbColumnInfoList = new List<DbColumnInfo>();
|
||||||
Init();
|
Init();
|
||||||
|
this.InsertBuilder.DbColumnInfoList = this.InsertBuilder.DbColumnInfoList.Where(it => oldColumns.Contains(it.PropertyName)).ToList();
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user