Logging NHibernate SQL queries

后端 未结 4 1085
执笔经年
执笔经年 2021-02-07 14:25

Is there a way to access the full SQL query, including the values, inside my code?

I am able to log SQL queries using log4net:



        
4条回答
  •  难免孤独
    2021-02-07 14:43

    Use a log4net appender with specific target (afair it supports being toggled on/off) or just extend it and toggle it within your try-catch-finally-off.

提交回复
热议问题