I'm trying to show the SQL in the console of Visual Studio but it doesn't work. I'm using fluent nhibernate with the following code:
string connectionString = WebCondStaClara.Lib.ConfigDB.StringConexao;
ISessionFactory sessionFactory = Fluently.Configure()
.Database(
MySQLConfiguration.Standard.ConnectionString(connectionString).ShowSql
)
.Mappings(m =>
m.FluentMappings
.AddFromAssemblyOf<Person>()
.AddFromAssemblyOf<Home>()
)
.ExposeConfiguration(cfg => new SchemaExport(cfg)
.Create(true, false)).BuildSessionFactory();
return sessionFactory.OpenSession();
What am I doing wrong?