I have used EF 6.0.8 in my project
Here, you can see an example of my code
var searchCriteria = CreateSearchString<T>(model);
if (!string.IsNullOrEmpty(searchCriteria))
{
result = !string.IsNullOrEmpty(searchCriteria)
? enumerable.AsQueryable().Where(searchCriteria, model.Search.Value.ToLower())
: enumerable.AsQueryable();
}
"( it.Parent1FirstName != null && it.Parent1FirstName.ToString().ToLower().Contains("Parent1"))"
Ui request model will send a dynamic query object (column properties and value) to filter data based on they need in grid view. See below the image.
A query was applied to my enumerable data source, but it was not filtering data. See below the image.
DATABASE SOURCE
Resolved: It was my fault. The answer is in the comment.
Resolved, It was my bad.
I was comparing .toLower()
case only for value not for properties
It's working fine now.