views:

36

answers:

2

I'd like to see sql query once linq to nhibernate query is executed to log or check sql query. How can I do?

A: 

Use SQL Profiler.

Mitch Wheat
+1  A: 

You could either configure log4net or use an SQL Profiler to see what's actually sent to the database. Yet another option (if you are willing to spend a few bucks) is to checkout Ayende's excellent tool.

Darin Dimitrov
+1 the log4Net option I'd forgotten about!
Mitch Wheat
In order to log query in NHibernate using log4Net, Which API do I need to use in NHibernate, actually this is really what I want to know.
kwon