>Hi,
>Digging through some code I came to this code definition for the EF ObjectSet class:
public class ObjectSet<TEntity> : ObjectQuery<TEntity>, IObjectSet<TEntity>, IQueryable<TEntity>, IEnumerable<TEntity>, IQueryable, IEnumerable where TEntity : class {}
Since IQueryable implements IEnumerable I don't see why the latter is explicitly listed. Is it just superflous or am I missing some subtlety ?
I haven't got vs2010 installed yet - so some thoughts
(1) IEnumerable< >
maybe because it implements that interface directly - have a look at the code
(2) IQueryable< >
I think - that IQueryable implements an interface that queries a 'datasource'. I suspect the IEnumerable of IQueryable will work on the result set that has been queried
So, it you use IEnumerable on an ObjectSet, you'll be using the IEnumerable of the ObjectSet
If you use the ObjectSet with LinQ using a where clause (or maybe things like .Take(n) ), you'll be using the IEnumerable of IQueryable
Gregory