I'm having trouble creating a list from an another list
original list:
key | fname | lname
------ | ------ | --------
11111 | hank | smith
1 | john | doe
22222 | jane | smith
2 | jim | smith
Here is my comma delimited list that I wanted to get the new list from
var search = "1,2";
what I'd like to have in my new list
key | fname | lname
------ | ------ | --------
1 | john | doe
2 | jim | smith
I could do a lambda if I was just looking for a single value. i.e.
var newList = originalList.firstOrDefault(x => x.key == "1")
how could I do this replacing the "1" with my search variable?