2 ms·
I don't think there is much difference between what ActiveRecord is doing and what LINQ does. The main LINQ object is an IQueryable object that implements IEnu
by akmiller 15y ago
I don't think there is much difference between what ActiveRecord is doing and what LINQ does.
The main LINQ object is an IQueryable object that implements IEnumerable. However, IEnumerable is not the object that has all the enumerator methods on it. That is IEnumerator. The only method IEnumerable has is the GetEnumerator method which returns the IEnumerator object.
So, in actuality, the "all" method in ActiveRecord kind of acts like the IEnumerable interface in returning the actual enumerator object.