I kind of grasp the whole delayed execution concept, but the following has me puzzled...
On a DataTable containing about 1000 rows, I call AsEnumerable(). I
It will not get all items from database until you type
ToList or First or Single
In foreach, you send a query into database for each item. So it works slower. Open your sql profiler to understand better.