Hi all, Just a bit rusty on the old linq. If I have 2 collections EG NewCustomerList and OldCustomerList and see if a surname exists already how would I do it in linq .I am sure there are many ways. SelectMany rings a bell but forgot how to do it!
In a forEach I would do something like that. What is the equivalent in linq?
foreach (var oldCustomer in OldCustomerList)
{
foreach (var newCustomer in NewCustomerList.Where(x => x.Surname == oldCustomer.Surname))
{
break;
}
}
Any Suggestions? Thanks a lot