Provides access to configuration information.
Namespace: NHibernate.CfgAssembly: NHibernate (in NHibernate.dll) Version: 3.2.0.4000 (3.2.0.4000)
Syntax
C# |
---|
public static class Environment |
Visual Basic |
---|
Public NotInheritable Class Environment |
Visual C++ |
---|
public ref class Environment abstract sealed |
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, <hibernate-configuration> section in the application configuration file
corresponds to Java system-level properties; <session-factory>
section is the session-factory-level configuration.
It is possible to use the application configuration file (App.config) together with the NHibernate
configuration file (hibernate.cfg.xml) at the same time.
Properties in hibernate.cfg.xml override/merge properties in application configuration file where same
property is found. For others configuration a merge is applied.