NHibernate: get SQL to execute as a string

From ICriteria, is it possible to get a string containing SQL that NHibernate plans to execute? I know that you can get a trace, but I was wondering if there is a method that can be called that generates SQL (for example, so you don't really need to hide the database).

+1
source share
2 answers

It is not directly exposed. Keep in mind that the generated SQL depends on the dialect, driver, and dispenser, so the last SQL is generated at the end of the pipeline.

0
source

NHibernate Profiler . nhprof.com/ edit: NHProf SQL, , . NHProf , .

0

All Articles