Skip to content

Instantly share code, notes, and snippets.

@cbilson
Created February 3, 2009 23:19
Show Gist options
  • Save cbilson/57821 to your computer and use it in GitHub Desktop.
Save cbilson/57821 to your computer and use it in GitHub Desktop.
public void GetSql() {
var cfg = new NHibernate.Cfg.Configuration();
SessionFactoryManager.Configurers.Get("fx").ConfigureProperties(cfg);
SessionFactoryManager.Models.Get("fx").Configure(cfg);
var exporter = new SchemaExport(cfg);
CancelView();
Response.Write("<html><body>");
exporter.Create(x => Response.Write("<br /><pre>" + x + "</pre>"), false);
Response.Write("</body></html>");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment