Following code passes EmployeeNumber one by one and if that is found in the internalEmployeelist
then that does not become part of results.
results=results.Where(itm => !IsInternalemployee(itm.EmployeeNumber)); //results is iqueryable
private bool IsInternalemployee(String itm)
return internalEmployeelist.Contains(itm) ? true : false; //internalEmployeelist is list<String>
Open in new window
Please help in providing some better way of doing it. please note that results is iqueryable while internalEmployeelist is just list<String>