I have a generic search method which should be able to search based on any field. I have something like this:
criteria = x => x[FieldName] == fieldValue;
This works well for strings but, how can I use it for a value of type DateTime greater than? We have tried something like this but doesn't work.
criteria = x => DateTime.Parse(x[FieldName]) >= EndDate);
Any idea?