ROW_NUMBER() and nhibernate - finding an item's page
问题 given a query in the form of an ICriteria object, I would like to use NHibernate (by means of a projection?) to find an element's order, in a manner equivalent to using SELECT ROW_NUMBER() OVER (...) to find a specific item's index in the query. (I need this for a "jump to page" functionality in paging) any suggestions? NOTE: I don't want to go to a page given it's number yet - I know how to do that - I want to get the item's INDEX so I can divide it by page size and get the page index. 回答1: