Question

From what I understand I need to end up with this

<property name="hibernate.generate_statistics">true</property>

on the session factory configuration, but I've no idea how to do that with fluent nhibernate.

Was it helpful?

Solution

Configuration.ExposeConfiguration(c => c.SetProperty("generate_statistics", "true"));

OTHER TIPS

In NHibernate 3 to avoid strings:

Configuration.ExposeConfiguration(c => c.SetProperty(NHibernate.Cfg.Environment.GenerateStatistics, "true"));

Depending on how you're configuring Fluent NHibernate, the Database Configuration has a Raw method that you can use to specify settings that we haven't implemented yet.

SQLiteConfiguration.Standard
  .Raw("hibernate.generate_statistics", "true");
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top