That wasn't the verbatim example, but I think with the second snippet, it still has to grab every row and transform it, THEN the Where() method is performed on the transformed object (maybe one of the properties you filter on is a composite value or something). It's still "lazy" in that it uses the yield statement, but it's still operating on a larger, unfiltered result set.
2
u/[deleted] Nov 29 '15
That wasn't the verbatim example, but I think with the second snippet, it still has to grab every row and transform it, THEN the Where() method is performed on the transformed object (maybe one of the properties you filter on is a composite value or something). It's still "lazy" in that it uses the yield statement, but it's still operating on a larger, unfiltered result set.