Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

SessionFactoryUtils.GetDbProvider Method

Gets the Spring IDbProvider given the ISessionFactory.

[Visual Basic]
Public Shared Sub GetDbProvider( _
   ByVal sessionFactory As ISessionFactory _
public static IDbProvider GetDbProvider(
   ISessionFactory sessionFactory


The session factory.

Return Value

The corresponding IDbProvider, null if no mapping was found.


The matching is performed by comparing the assembly qualified name string of the hibernate Driver.ConnectionType to those in the DbProviderFactory definitions. No connections are created in performing this comparison.


Exception Type Condition
InvalidOperationException If DbProviderFactory's ApplicaitonContext is not an instance of IConfigurableApplicaitonContext.

See Also

SessionFactoryUtils Class | Spring.Data.NHibernate Namespace