NHibernate: How to show the generated SQL-statements in the windows console

Posted by Rookian on Stack Overflow See other posts from Stack Overflow or by Rookian
Published on 2010-03-18T16:10:25Z Indexed on 2010/03/18 17:51 UTC
Read the original article Hit count: 354

Filed under:
|
|
 return Fluently.Configure()
                .Database(MsSqlConfiguration.MsSql2008
                              .ConnectionString(c => c
                                                         .Database(Database)
                                                         .TrustedConnection()
                                                         .Server(Server)
                              ).ShowSql())
                .ExposeConfiguration(c => c.SetProperty("current_session_context_class", "web"))
                .Mappings(m => m.FluentMappings.AddFromAssemblyOf<TeamMap>()).BuildConfiguration();

I have a web application. This configuration does not work.

I also have a Console application that shall be responsible to write out all generated SQL.

How can I get the generated SQL commands?

Thanks in advance!

© Stack Overflow or respective owner

Related posts about log4net

Related posts about sql