linq c# find items in list based on another list code example
Example 1: select from list where not in other list c#
var result = peopleList2.Where(p => peopleList1.All(p2 => p2.ID != p.ID));
Example 2: c# linq get list of objects based on another list
var filtered = listOfAllVenuses
.Where(x=>!listOfBlockedVenues.Any(y=>y.VenueId == x.Id));
Example 3: select from list where not in other list c#
var result = peopleList2.Where(p => !peopleList1.Any(p2 => p2.ID == p.ID));