How do I get row count using the NHibernate QueryOver api?
        Posted  
        
            by Jim Geurts
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Jim Geurts
        
        
        
        Published on 2010-03-22T01:28:38Z
        Indexed on 
            2010/03/22
            1:31 UTC
        
        
        Read the original article
        Hit count: 383
        
nhibernate
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 collection. Is there a way to just return an integer/long value of the number of rows?
I'm currently using:
_session.QueryOver<MyObject>().Future().Count()
© Stack Overflow or respective owner