NHibernate database call count?
问题 Is there a way to get at runtime the number of calls NHibernate is making to the database? I know I can use the NHibernate profiler (NHProf, http://nhprof.com/) to manually view this count while debugging - but what I'd like to do is at runtime to get the actual number of calls to the database NHibernate is making so I can throw an exception if it's a ridiculous number like 50 or 300 (exact number to be determined). This would be an indication to the developer that he/she needs to use 'Eager'