1、:引入 dll

在你实例化ISessionFactory的项目中引用下边Dll。

 

 HibernatingRhinos.Profiler.Appender.dll //此文件在Nh Profiler安装目录中

 

2、:注册

  将下边代码放在 new Configuration()).Configure().BuildSessionFactory();前边。

   HibernatingRhinos.NHibernate.Profiler.Appender.NHibernateProfiler.Initialize();


 打开NH profiler,运行项目,就可以在NH profiler中看到SQL了。


相关文章:

  • 2022-02-15
  • 2021-11-29
  • 2021-11-11
  • 2021-11-29
猜你喜欢
  • 2021-07-07
  • 2021-09-27
  • 2021-12-09
  • 2021-09-05
相关资源
相似解决方案