Skip to content

Instantly share code, notes, and snippets.

@anwtn
anwtn / gist:4546570
Last active December 11, 2015 04:38
Use PredicateBuilder to search for partial matches for keywords in an entity property based on this answer - http://stackoverflow.com/a/14349896/201648
//http://arbel.net/2008/08/18/writing-methods-and-classes-in-linqpad/
//Choose "C# Statement(s)" in the Type drop-down.
//Write the code that LINQPad should execute.
//Put a closing curly-bracket ("}") at the end.
//Write as many classes and methods as you like.
//http://arbel.net/2008/08/18/writing-methods-and-classes-in-linqpad/
//Choose "C# Statement(s)" in the Type drop-down.
//Write the code that LINQPad should execute.
//Put a closing curly-bracket ("}") at the end.
//Write as many classes and methods as you like.
//On the last class/method, omit closing curly-bracket.
List<KeyValuePair<int, int>> housePersonPairs = new List<KeyValuePair<int, int>>();
housePersonPairs.Add(new KeyValuePair<int, int>(1, 11));
housePersonPairs.Add(new KeyValuePair<int, int>(1, 12));