0

I'm working on some code that hit the database several times through NHibernate. I'd like to see how I can write a procedure.

To ease my work, this is what I want:

  • Initiate the operation from the UI
  • Log all the request to the DB from the beginning to the end.
  • Know the statements that the DB execute for each request.

I'd like to log information from the prospective of the DB. I tried before to follow all the codes that make request to the database.

Thank for helping

Richard77
  • 20,343
  • 46
  • 150
  • 252
  • In addition to these excellent suggestions, you can also configure nhibernate to emit the sql to the console or configure log4net to emit NHibernate.SQL to a text file or database – Darren Kopp Dec 05 '13 at 19:21
  • I believe that what you seek is here http://stackoverflow.com/questions/474659/how-to-log-sql-calls-with-nhibernate-to-the-console-of-visual-studio http://stackoverflow.com/questions/819040/how-to-know-query-generated-by-fluent-nhibernate – Paulo Lima Dec 13 '13 at 16:30

1 Answers1

0

If you want to work with nhibernate I suggest you to give Rhino a try.

Rhino

jean
  • 4,159
  • 4
  • 31
  • 52
  • Any reason why this was downvoted? I love SqlServer Profiler but for nHibernate I found Rhino better as it helps with code analysis. – jean Dec 06 '13 at 19:27