I am trying to search at the same time with pagination so I pass fieldname and fieldvalue to the url and get this. In the example below, I get the fieldname as 'firstName' and fieldValue as 'Jay'. Then I want to search like this but I get this error, ORM blah blah blah.. I am using LLBLgen as ORM but it seems it's more related to linq. Any ideas?
var sm ={
FieldName:'firstName',
FieldValue:'Jay'
}
orderModels = orderModels.Where(x => x + "." + sm.FieldName == sm.FieldValue);
You can use
System.Dynamic.Linqpackage so that you can build query dynamically:See: https://dotnetfiddle.net/cs6MRX