Ienumerable

IEnumerable, and its generic counterpart IEnumerable<T> are .NET interfaces for iterating (or enumerating) through a collection of items.

Iqueryable

.NET Framework Interface, providing functionality to evaluate queries against a specific data source wherein the type of the data is not specified.

Calls quicker place

Quality Example
More suitable

"I d say iqueryable is more suitable for interaction with a database than ienumerable is"

from question "AsEnumerable().Take"

Way quicker

"With really basic calls to the database iqueryable is way quicker but when do i need to think about using an ienumerable in its place"

from question "LINQ to Entities - Entity Framework"

Generic instances

Quality Example
More

"Ienumerable is more generic than iqueryable though all"

from question "Linq Sum() precision"

More generic

"Ienumerable is more generic than iqueryable though all instances of iqueryable implement ienumerable and only defines"

from question "Retrieving 10 records at a time only using LINQ"

Better query linq

Quality Example
Better

"What i know is using iqueryable is better than ienumerable if another query is going to be performed"

from question "Do I need to use AsQueryable() for a method that returning IQueryable<Type> in .NET EF"

"I have read about ienumerable and iqueryable i have read that iqueryable is better with linq because when you use where clauses it creates the exact query it needs but with ienumerable it retrieves all rows from database and then filters on memory"

from question "IEnumerable and IQueryable, which one does it use when I use the var keyword?"

Others

Quality Example
Slower

"In simple words all operations on ienumerable causes simple iteratation over all elements well it s lazy ienumerable really slower than iqueryable"

from question "Creating a composite condition using anonymous filter method"

Smaller

"For your view to expect an ienumerable you need to change your view declaration to be also if you really need to perform a find use iqueryable first them return the result as ienumerable since the payload on ienumerable is smaller than iqueryable"

from question "Using a Projection in place of Find() in LINQ"

Much more preferable

"I m not familiar with the infeasability of iqueryable but this blog post seems to indicate that iqueryable is much more preferable to ienumerable because iqueryable allows access to the underlying expression"

from question "Why using Count with IQueryable is considered unfeasible"

Better

"The ienumerable side of linq which works on in-memory objects that are already in the heap will almost certainly perform better than the iqueryable side which exists to be translated into a native query language like sql"

from question "Is LINQ faster on a list or a table?"

"Final result will be of type ienumerable and in terms of performance this would be better than iqueryable since here join is taking place between in memory collections"

from question "* (no title is found for this review)"

More useful

"Can you provide any useful example that shows ienumerable could be more useful than iqueryable"

from question "When is IEnumerable preferred over IQueryable in Entity Framework?"

Faster

"I assume applying iqueryable will be much faster than the ienumerable not to forget i was able to use iqueryable on the other entities without any issues"

from question "Use IQueryable on stored procedure in Entity Framework"

Implementation more picky

"Entity framework s iqueryable implementation is more picky about creating new objects in objects than regular linq to objects ienumerable"

from question "EF : Projecting data into a sub-class of a class"

Back to Home
Data comes from Stack Exchange with CC-BY-SA-3.0