Hello everybody I'm using the Telerik ASP.NET MVC2 grid and i need to change the way how the filters are non-case sensitive because the DB bugs when using lower method. So, i want to create a linq expression that will test every case possibilities. (for example "aaa","Aaa","AaA" etc...) I need to do that in the following code.
Thank's by advance.
private static Expression GenerateCaseInsensitiveStringMethodCall(MethodInfo methodInfo, Expression left, Expression right)
{
if (methodInfo.IsStatic)
return Expression.Call(methodInfo,new[] { left, right });
else
return Expression.Call(left, methodInfo,right);
/*
var leftToLower = GenerateToLowerCall(left);
var rightToLower = GenerateToLowerCall(right);
if (methodInfo.IsStatic)
{
return Expression.Call(methodInfo, new[] { leftToLower, rightToLower });
}
return Expression.Call(leftToLower, methodInfo, rightToLower);*/
In file FilterOperationExtensions.cs,
change method GenerateToLowerCall to just return the liftedtoEmpty variable
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.