I wanna do something like that
public IQueryable GetPaged<TSource>(IQueryable<TSource> query, int startIndex, int pageSize)
{
return GetSession()
.Linq<TSource>()
.UseQuery(query)
.Take(pageSize)
.Skip(startIndex);
}
So you can put any IQuerable statement and "it becomes paged" or it will be paged.
I am using LINQ to NHibernate. I hope you get it, sry for this bad english :o
edit: Maybe my approach is the wrong one, is it?
This is copied from working code: