<< back to blog

IQueryable is a FATTY!

.net ~ linq

20 Oct, 2008

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...
.NET Gem Fun
Running FubuMVC on Mono (OSX)
Really Easy Way To Partition an ASP.NET MVC With An Admin Area
Automating .NET development (and NHibernate) with IronRuby + Rake
Get a Rails-Stylee Interactive Shell For Your NHibernate Backed Domain Model
In Memory SQLite Testing with NHibernate
NHibernate Trick
OSX MonoDevelop MVC?
NHibernate: Calling Update Unnecessarily
.NET Config for Multiple Developers

kick it on DotNetKicks.com
blog comments powered by Disqus