- This topic has 1 reply, 2 voices, and was last updated 7 years, 4 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Tagged: DIfference-IQueryable-IEnumerable, IEnumerable, IEnumerable-Vs-IQueryable, IQueryable, IQueryable Vs IEnumerable
In a recent interview, I was asked about What is the Difference Between IEnumerable and IQueryable in C#?I googled it, but still not clear properly what is the difference and which all cases each one fit properly.Please explain in a simple manner that What is the Difference Between IEnumerable and IQueryable.
The main difference between IEnumerable and IQueryable in C# is,
IEnumerable is suitable for querying data from in-memory collections such as Array and List.IEnumerable is beneficial for LINQ to XML and LINQ to Object queries.
IQueryable is suitable for querying data from out-of-memory collections such as databases.IQueryable is beneficial for Linq to SQL queries.
© Copywright 2017 Dotnetstuffs All Rights Reserved