Oct 20, 2008 / .net ~ linq
IQueryable is a FATTY!

I probably missed the point here, but IQueryable seems to be rather bloated!?

Couldn't it be more fine grained ilke this?

public interface IQueryable<T> 
                          : IPagable<T>, 
                            IListable<T>, 
                            IAggregatable<T>, 
                            ISetOperable<T> ...
{
    //....
}

public interface IPagable<T>
{
    IPageable<T> Skip( long records );
    IPageable<T> Take( long records );
}

public interface IListable<T>
{ 
    IList<T> ToList();
}

// ...
//

This way our applications could depend on subsets of the IQueryable methods. And yeah, I realise that the above won't actually work, but you get the idea :)

Is something like this possible already, or am I just being dim!?


You may also like...