Getting Row Count in NHibernate
Getting the row count of a table, that is easy in NHibernate. You can do it this way:
But this is very heavy weighted. You are retrieving a whole list of objects!!!! But you just need to know the numbers of objects! You are wasting a lot of processing power!
You can do it this way. That is only getting a row count, just a number! Therefore, a "select count(*)" query is executed.
Trackback address for this post
Feedback awaiting moderation
This post has 100 feedbacks awaiting moderation...
Form is loading...