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

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -