【发布时间】:2010-10-11 11:03:59
【问题描述】:
我已将 NHibernate 配置为将其生成的 SQL 输出到控制台。我已将以下内容添加到 DLL 的 app.config 中,其中包含我想从 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>
但是,SQL 仍未输出到 Console.Out。谁能想到我可能需要设置另一个设置来查看我的 NHibernate 查询产生的 SQL?
【问题讨论】:
标签: sql nhibernate show-sql