I want to do something like this
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 will be unloaded" or it will be unloaded.
I am using LINQ for NHibernate. I hope you understand this, swallow this bad English: o
edit: Maybe my approach is wrong, right?
source share