What is difference between IEnumerable and IList?
Ans. There are following differences between ADO.NET and Entity Framework:
IEnumerable
Move forward only over a collection, it can’t move
backward and between the items.
Doesn’t support add or remove items from the list.
Find out the no of elements in the collection after
iterating the collection.
Supports further filtering
IList
Used to access an element in a specific position/index
in a list.
Useful when you want to Add or remove items from
the list.
Find out the no of elements in the collection without
iterating the collection.
. Doesn’t support further filtering.
Ans. There are following differences between ADO.NET and Entity Framework:
IEnumerable
Move forward only over a collection, it can’t move
backward and between the items.
Doesn’t support add or remove items from the list.
Find out the no of elements in the collection after
iterating the collection.
Supports further filtering
IList
Used to access an element in a specific position/index
in a list.
Useful when you want to Add or remove items from
the list.
Find out the no of elements in the collection without
iterating the collection.
. Doesn’t support further filtering.
Comments
Post a Comment