Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

LocalSessionFactoryObject.CreateDatabaseSchema Method

Execute schema creation script, determined by the Configuration object used for creating the SessionFactory. A replacement for NHibernate's SchemaExport class, to be invoked on application setup.

[Visual Basic]
Public Sub CreateDatabaseSchema()
[C#]
public void CreateDatabaseSchema();

Remarks

Fetch the LocalSessionFactoryObject itself rather than the exposed SessionFactory to be able to invoke this method, e.g. via

LocalSessionFactoryObject lsfo = (LocalSessionFactoryObject) ctx.GetObject("mySessionFactory");
.

Uses the SessionFactory that this bean generates for accessing a ADO.NET connection to perform the script.

See Also

LocalSessionFactoryObject Class | Spring.Data.NHibernate Namespace