The lazy nature of iterators and query operators defined over them is a very nice property for a variety of reasons (as mentioned in passing). For example, it enables you to define a query once and execute it multiple times, yet providing possibly different results every time because the underlying data store might have changed. In addition to this, it allows for query optimization and wholesale remoting of a query expression into some domain-specific query language like SQL.
However, sometimes you just want to trigger the execution of a query on the spot, storing its results in an in-memory data structure. That’s what various persistence operators such as
ToList are used for. Notice some other operators like ...