LINQ OrderBy: best search results at top of results list
- by p.campbell
Consider the need to search a list of Customer by both first and last names. The desire is to have the results list sorted by the Customer with the most matches in the search terms.
FirstName LastName
---------- ---------
Foo Laurie
Bar Jackson
Jackson Bro
Laurie Foo
Jackson Laurie
string[]…