I\'m struggling with LINQ syntax here...thought I\'d toss it out here. I cant find exactly what I\'m looking for anywhere else.
OK, say I\'ve got this:
In general, you're looking for the "Except" extension.
var rejectStatus = GenerateRejectStatuses();
var fullList = GenerateFullList();
var rejectList = fullList.Where(i => rejectStatus.Contains(i.Status));
var filteredList = fullList.Except(rejectList);
In this example, GenerateRegectStatuses() should be the list of statuses you wish to reject (or in more concrete terms based on your example, a List
of IDs)