I have a list of partial rows that I need to map in a table. I am using PredicateBuilder.
var predicate = PredicateBuilder.False<Name>(); List<string> names = new List<string>(); names.Add("test name"); **<===matches** names.Add("test"); **<=== doesn't match** predicate = predicate.Or(n => names.Contains(n.Company)); var results = (from n in Names .AsExpandable() .Where(predicate) select(new{ n.Company}));
n.Company = "test name"
This will match if n.Company is exactly the “test name”, but it does not match if I just use the “test”. How to match partial in a list. Contains?
source share