Modifiy telerik grid filter LINQ entity expression
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 (me开发者_如何学编程thodInfo.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
精彩评论