Use Enumerable.AsEnumerable() if you don't want to execute the database query immidiatly because because AsEnumerable()
will still deffer the database query execution until you start enumerating the LINQ to Object query.
If you are sure that you will require the data and/or want to immidiatly execute the database query, use Enumerable.ToList() or Enumerable.ToArray(). The performance difference should be not to big.
I assume the rows are read into a variable sized container at first in both call, because the number of rows is not yet known. So I tend to say that ToList()
could be a bit faster, because the rows could be directly read into the list while ToArray()
probably reads the rows into a kind of list at first and then copies to an array after all rows have been transfered.