Accepted answer

you can do that with:

where updatedObjects.Any(uo => uo.ID == o.ID)


You should be looking to implement batch updates with linq for example like it's described at


You could create a lambda or another method that performs the check for you; for example

where IDMatches(o.ID, updatedObjects)

and then define IDMatches as a simple iteration over updatedObjects.

static void IDMatches(int id, List<MyObject> updatedObjects)
    foreach (MyObject updated in updatedObjects)
        if (id == updated.ID)
            return true;
    return false;

Related Query