Reputation: 1548
I am using Fluent NHibernate. I want to count number of session gets created and present in application. Is there any way to count that ?
Please share your view and suggestion.
Upvotes: 1
Views: 1051
Reputation: 902
When creating your configuration, do also:
var config = new Configuration();
config.DataBaseIntegration(db => { .. });
config.SessionFactory().GenerateStatistics();
And then look at:
SessionFactory.Statistics.EntityFetchCount
Upvotes: 2