In the previous post, I have explained the idea behind Deferred Execution. What if you wanted to directly execute the query expression and bind the results to a GridView or any other Data Control? In this case, Deferred Execution is not required. The solution is simply using one of the methods defined on the Sequence class:
and now the previous query expression is as follows:
var getCustomers= (from c in db.Customers
We don't have Deferred Execution anymore and the getCustomers now include all the records.
Hope this helps,