What is the difference between returning iqueryable vs ienumerable?



What is the difference between returning iqueryable vs ienumerable?..

Answer / Pradip Kumar Dubey

Returning IQueryable allows deferred execution of LINQ queries until they are actually enumerated, enabling the provider to optimize and modify the query. Returning IEnumerable executes the query immediately, returning a collection that can be traversed but cannot be modified.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

Can a constructor be private in c#?

1 Answers  


What is CASPOL?

1 Answers   MCN Solutions,


Why do we use dictionary in c#?

1 Answers  


What is the signature of a method?

1 Answers  


what is work of continue statement in C#?

3 Answers  


What is the difference between protected and protected internal?

5 Answers   Fulcrum Logic,


What is the solution if you need to manipulate sets of items?

1 Answers  


What is the main usage of keyword “virtual” ? How does it work for a method or property?

1 Answers   Siebel,


Is array reference type / value type ?

6 Answers   Accenture, BirlaSoft,


If dll and exe files are same it means you can deploy both the files in gac?

1 Answers  


Can we maintain state in webservice?

1 Answers  


Is c# static or dynamic?

1 Answers  


Categories