In SQL, you always need to strive for operations with a set with respect to iteration (i.e., to a loop). In .NET, we often collect collections and objects. Are there any commands in .NET that let you handle set-based or all iterative processes? (I am reminded of how it DataAdapter.Fillcalls DataReader, which iterates over each record in the result set). I am not very familiar with LINQ, but I assume that its implementation simply masks the iterations taking place behind the scenes.
UPDATE:
To clarify: I do not pretend to be some kind of genius here, and I will not guess any of the brilliant people who improve my life. I just ask if there are any commands that perform set-based operations, such as SQL, when you UPDATEare against foreach(var item in obj) { ... }, which explicitly iterates through the object. SQL developers are punished at every step if they ever use a loop, but in .NET we use them all the time. As a developer who works a lot in SQL and .NET, I ask if there are any alternatives in .NET that generally avoid a loop.
source
share