I am trying to retrieve a list of names from a large IEnumerable with 142000 objects. For some reason.. the operation is timing out and leaving an incomplete list of names. Is there a better and faster way to do what I am doing in the code below:
IEnumerable<MyClass> table = GetAll(); // Get All returns an IEnumerable<MyClass>
IEnumerable<string> allNames = new List<string>();
allNames = table.Where(r => listOfIds.Contains(r.id)).Select(r => r.name);
Any help appreciated,
Ted