I’m trying to understand what an IEnumerable<> is exactly.
I had thought it was just an interface saying the underlying data structure has these methods eg first() etc.
However I have tested the the below code in EF which I would have expected to produce a TOP query in the DB as if it were running as an IQueryable, but it instead causes it to pull the entire table in memory to perform its operation.
IEnumerable<EntityObject> m = DbContext.GetDbSet<EntityObject>();
var x = m.First();
So does treating something as an IEnumerable force it into operating as an array or list or something?