I need to do the following for the purposes of paging a query in nHibernate:
Select count(*) from (Select e.ID,e.Name from Object as e where...)
If you just need e.Id,e.Name:
e.Id
e.Name
select count(*) from Object where.....
select count(*) from Object where