You will see that in many of the LINQ to SQL examples in this chapter and the subsequent LINQ to SQL chapters, I work with sequences of type IQueryable<T>, where T is the type of an entity class. These are the type of sequences that are typically returned by LINQ to SQL queries. They will often appear to work just like an IEnumerable<T> sequence, and that is no coincidence. The IQueryable<T> interface implements the IEnumerable<T> interface. Here is the definition of IQueryable<T>:
interface IQueryable<T> : IEnumerable<T>, IQueryable
Because of this inheritance, you can treat an IQueryable<T> sequence like an IEnumerable<T> sequence.