Is there a more efficient way of achieving this update using linq? -
by efficient, i'm referring resources.
foreach (var n in activenodes.where(x => userapplications.any(y => y.buyerid == x.buyerid))) { n.status = pingtreestatus.duplicate; }
linq querying not updating. method fine as-is. linq allow create new collection different property values (saving of overhead of creating new object, adding ti list, etc.), not designed update collection in-place.
Comments
Post a Comment