下面的代码有效,但我想介绍一个ToUpper()
var predicate =
Expression.Lambda<Func<T, bool>>(
Expression.Call(
Expression.PropertyOrField(parameter, "FirstName"),
"Contains", null,
Expression.Constant("myvalue".ToUpper())), parameter
);
结果是:
{Param_0 => Param_0.FirstName.Contains("MYVALUE")}
但我想要这个:
{Param_0 => Param_0.FirstName.ToUpper().Contains("MYVALUE")}
我该如何改变?