Provides access to configuration information.
Namespace:
NHibernate.CfgAssembly: NHibernate (in NHibernate.dll)
Syntax
Visual Basic (Declaration) |
---|
Public NotInheritable Class Environment |
C# |
---|
public sealed class Environment |
Visual C++ |
---|
public ref class Environment sealed |
JavaScript |
---|
NHibernate.Cfg.Environment = function(); Type.createClass( 'NHibernate.Cfg.Environment'); |
Remarks
NHibernate has two property scopes:
Factory-level properties may be passed to the ISessionFactory when it is
instantiated. Each instance might have different property values. If no properties are
specified, the factory gets them from Environment
System-level properties are shared by all factory instances and are always determined
by the Environment properties
In NHibernate, <nhibernate> section in the application configuration file
corresponds to Java system-level properties; <hibernate-configuration>
section is considered to be the session-factory-level configuration. It is possible
to use the applicatoin configuration file (App.config) together with the NHibernate configuration
file (hibernate.cfg.xml) at the same time.