Friday, November 28, 2008

LINQ : IEnumerable and IQueryable

IEnumerable and IQueryable are the two most used interfaces in . What I am trying to do here is that I am trying to differentiate the two interfaces depending on their behavior. In LINQ we generally have few providers available within .NET Framework, like LINQ to Object, LINQ to SQL, LINQ to XML.

All the LINQ query statement returns an object of type IEnumerable.This holds good for LINQ to Object and LINQ to XML.But LINQ to SQL is something different as the query statement will be convered toa SQL statement internally while execution.So LINQ to SQL queries return object of type IQueryable which is again inherited from IEnumerable.

To check what are the different methods and properties this interface have, visit the following URL.

Namastee !