I'm trying to get the filterExpressions working on my Linq query using the Dynamic Linq Library but am getting this error
LINQ to Entities does not recognize the method 'System.String ToString()' method, and this method cannot be translated into a store expression.
It looks like the filterExpression uses ToString() which is causing the error
(iif(LogType.Name == null, "", LogType.Name).ToString().Contains("Error"))
My code is
LINQ to Entities does not recognize the method 'System.String ToString()' method, and this method cannot be translated into a store expression.
It looks like the filterExpression uses ToString() which is causing the error
(iif(LogType.Name == null, "", LogType.Name).ToString().Contains("Error"))
My code is
string
filterExpression = (sender
as
RadGrid).MasterTableView.FilterExpression;
logs = db.Logs
.Where(x => x.SystemId.Equals(
this
.SystemId.Value))
.Where(filterExpression)
.OrderByDescending(x => x.OccurredOn)
.Skip(skip)
.Take(pageSize)
.ToList();