Configure NHibernate using the <hibernate-configuration> section
from the application config file, if found, or the file hibernate.cfg.xml
otherwise.
Namespace:
NHibernate.CfgAssembly: NHibernate (in NHibernate.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Function Configure As Configuration |
C# |
---|
public Configuration Configure() |
Visual C++ |
---|
public: Configuration^ Configure() |
JavaScript |
---|
function configure(); |
Return Value
A configuration object initialized with the file.
Remarks
To configure NHibernate explicitly using hibernate.cfg.xml, ignoring
the application configuration file, use this code:
![]() | |
---|---|
configuration.Configure("path/to/hibernate.cfg.xml"); |