Configure NHibernate using the <hibernate-configuration> section
from the application config file, if found, or the file hibernate.cfg.xml if the
<hibernate-configuration> section not include the session-factory configuration.
Namespace: NHibernate.CfgAssembly: NHibernate (in NHibernate.dll) Version: 3.2.0.4000 (3.2.0.4000)
Syntax
C# |
---|
public Configuration Configure() |
Visual Basic |
---|
Public Function Configure As Configuration |
Visual C++ |
---|
public: Configuration^ Configure() |
Return Value
A configuration object initialized with the file.Remarks
To configure NHibernate explicitly using hibernate.cfg.xml, appling merge/override
of the application configuration file, use this code:
CopyC#
configuration.Configure("path/to/hibernate.cfg.xml");