Hello Guys, I have an extension method for my queries to page it, this is the code:public static PagedList<T> ToPageList<T>(this IQueryOver<T, T> query, int size, int index){int total = query.Clone().FutureRowCount();var list = query.Take(size).tSkip((index - 1)*size).Future<T>();return new PagedList<T>(list, total, size, index);}It works fine, but when I use an order by method (on my queryover), the Nhibernate process this order by command on the count query.My question is, is there any way to remove the order by from the QueryOver to NHibernate count it without order by?Or if anyone has any suggestions to improve this method, I would appreciate.PS: I use it with asp.net mvcThank you!--
______________________________________
Felipe B. Oriani
--
You received this message because you are subscribed to the Google Groups "nhusers" group.
To view this discussion on the web visit https://groups.google.com/d/msg/nhusers/-/-VZsmX85IosJ.
To post to this group, send email to nhu...@googlegroups.com.
To unsubscribe from this group, send email to nhusers+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
To unsubscribe from this group, send email to nhusers+unsubscribe@googlegroups.com.
--______________________________________
Felipe B. Oriani
To view this discussion on the web visit https://groups.google.com/d/msg/nhusers/-/rCA4iRK1_UwJ.
To unsubscribe from this group, send email to nhusers+u...@googlegroups.com.
Hello Guys, I have an extension method for my queries to page it, this is the code:public static PagedList<T> ToPageList<T>(this IQueryOver<T, T> query, int size, int index){int total = query.Clone().FutureRowCount();var list = query.Take(size).tSkip((index - 1)*size).Future<T>();return new PagedList<T>(list, total, size, index);}It works fine, but when I use an order by method (on my queryover), the Nhibernate process this order by command on the count query.My question is, is there any way to remove the order by from the QueryOver to NHibernate count it without order by?Or if anyone has any suggestions to improve this method, I would appreciate.PS: I use it with asp.net mvcThank you!--
______________________________________
Felipe B. Oriani