Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

LocalSessionFactoryObject.DropDatabaseSchema Method

Execute schema drop 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 DropDatabaseSchema()
[C#]
public void DropDatabaseSchema();

Remarks

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

LocalSessionFactoryObject lsfb = (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