I have a list of partial strings that I need to match in a table. I\'m using PredicateBuilder.
var predicate = PredicateBuilder.False();
List<
You should change your code this way
var predicate = PredicateBuilder.False<Name>();
List<string> names = new List<string>();
names.Add("test name");
names.Add("test");
foreach(string name in names)
{
string temp = name;
predicate = predicate.Or(n => n.Company.Contains(temp));
}
var results = (from n in Names
.AsExpandable()
.Where(predicate)
select(new{ n.Company}));