I have two lists IQueryable<>. Let's say that one is filled with class objects Bottle, and the other is of type Cup.
Both classes have a guid called DrinkID.
How can I take my list Bottleand find all the elements in the list Cupwith DrinkIDwhich is NOT in the list Bottle?
I am looking for something like this:
var bottles = _context.AllBottles;
var cups = _context.AllCups.Where(cup => cup.DrinkID not in bottles.DrinkID);
I am using Linq for Entities.
source
share