I Have two generic list filled with CustomsObjects.
I need to retrieve the difference between those two lists(Items who are in the first without the items in the sec
var list3 = list1.Where(x => !list2.Any(z => z.Id == x.Id)).ToList();
Note: list3 will contain the items or objects that are not in both lists. Note: Its ToList() not toList()
list3
ToList()
toList()