开发者

NHibernate not outputting SQL to console

I have configured NHibernate to output the SQL it generates to the console. I have added the following to the app.config of the DLL contai开发者_JAVA技巧ning the integration tests I want to run from NUnit:

  <configSections>
    <section name="nhibernate" type="System.Configuration.NameValueSectionHandler, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
  </configSections>
  <nhibernate>
    <add key="hibernate.connection.provider" value="NHibernate.Connection.DriverConnectionProvider" />
    <add key="hibernate.show_sql" value="true" />
  </nhibernate>

However, the SQL is still not being output to Console.Out. Can anyone think of another setting I might need to set to view the SQL resulting from my NHibernate queries?


Did you try using a sepparate xml config? http://nhibernate.info/doc/howto/various/configure-log4net-for-use-with-nhibernate.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜