Update exp to sql(DTO)

This commit is contained in:
sunkaixuan 2025-06-07 16:27:39 +08:00
parent 948a544c04
commit 5efe3fa039

View File

@ -356,6 +356,19 @@ namespace SqlSugar
item = (item as UnaryExpression).Operand; item = (item as UnaryExpression).Operand;
} }
} }
if (item is ParameterExpression)
{
var itemType = item.Type;
var ignoreProperty = itemType.GetProperties().FirstOrDefault(it => it.PropertyType == itemType);
if (ignoreProperty != null && ignoreProperty.Name != memberName)
{
if (this.Context.SugarContext.QueryBuilder.SelectNewIgnoreColumns == null)
{
this.Context.SugarContext.QueryBuilder.SelectNewIgnoreColumns = new List<KeyValuePair<string, string>>();
}
this.Context.SugarContext.QueryBuilder.SelectNewIgnoreColumns.Add(new KeyValuePair<string, string>(ignoreProperty.Name, itemType.Name));
}
}
ResolveNewExpressions(parameter, item, memberName); ResolveNewExpressions(parameter, item, memberName);
} }
} }