What is the difference between IEnumerable and IQueryable?

  • IEnumerable is an interface available in the System.Collection namespace.
  • Any collection that implements the IEnumerable makes it iterable.
  • The IEnumerable or the Generic IEnumerable must be used over in-memory objects.
  • IQueryable is an interface available in the System.Linq namespace and implements IEnumerable
  • The IQueryable interface provides the IQueryProvider, which is used to create LINQ providers used in data-centric operations such as LINQ-to-SQL etc.
  • By using the AsQueryable() method over a collection, we can convert it into an IQueryable collection.
  • IEnumerable is an interface available in the System.Collection namespace.
  • Any collection that implements the IEnumerable makes it iterable.
  • The IEnumerable or the Generic IEnumerable must be used over in-memory objects.
  • IQueryable is an interface available in the System.Linq namespace and implements IEnumerable
  • The IQueryable interface provides the IQueryProvider, which is used to create LINQ providers used in data-centric operations such as LINQ-to-SQL etc.
  • By using the AsQueryable() method over a collection, we can convert it into an IQueryable collection.
Sriram Mannava
Sriram Mannava

I'm a full-stack developer and a software enthusiast who likes to play around with cloud and tech stack out of curiosity.

Leave a Reply

Your email address will not be published. Required fields are marked *