I\'m using the QueryOver api that is part of NHibernate 3.x. I would like to get a row count, but the method I\'m using returns all objects and then gets the count of the colle
After a bit of playing around with the api, this will do it:
_session.QueryOver() .Select(Projections.RowCount()) .FutureValue() .Value
If you don't want to return it as a future, you can just get the SingleOrDefault() instead.
SingleOrDefault()