protected override void Init() { var config = DatabaseConfigurator.SetEntities().BuildConfiguration(); Kernel.Register( Component.For <ISessionFactory>().UsingFactoryMethod(config.BuildSessionFactory), Component.For <ISession>().UsingFactoryMethod(k => k.Resolve <ISessionFactory>().OpenSession()).LifeStyle.PerWebRequest ); }
public ActionResult Tabelas() { new SchemaExport(DatabaseConfigurator.SetEntities().BuildConfiguration()).Execute(false, true, false); return(View()); }