I have the following line of code:
protected Expression<Predicate<DuplicateCheck>> Name= x => x.Name == "smith";
when I add a .ToLower()
protected Expression<Predicate<DuplicateCheck>> Name= x => x.Name.ToLower() == "smith";
to try to generalize the query I get the error
System.Reflection.TargetException: 'Non-static method requires a target.'
Is this not available to use in this way?