How to know query generated by Fluent NHibernate

后端 未结 8 1368
萌比男神i
萌比男神i 2020-12-30 00:07

I am using linq to Nhibernate to fire some select query to data base.

My question is, how do I know, the query generated by Fluent NHibernate?

8条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-30 00:24

    With Fluent NHibernate, you can turn on show_sql like this:

    Fluently.Configure()
        .Database( MsSqlConfiguration.MsSql2005.ShowSql().ConnectionString(...) )...
    

    NHibernate will now print every sql statement to Console.Out.

提交回复
热议问题