【问题标题】:NHibernate not outputting SQL to consoleNHibernate 没有将 SQL 输出到控制台
【发布时间】: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


    【解决方案1】:

    【讨论】:

    • 非常感谢,正是我想要的。
    猜你喜欢
    • 2019-05-05
    • 2019-01-02
    • 1970-01-01
    • 2018-01-20
    • 2020-05-16
    • 2011-06-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多