NPersistence Reference Guide
Assembly: NPersistence (in NPersistence.dll) Version: 2.0.0.0 (2.0.0.0)
This interface is used for configuring NPersistence inside a web application.
Inside a web application the NPersistence configuration is done as follows:
Namespace: NPersistence- The 'persistence-unit' xml tag that configures NPersistence (which is usualy placed inside the persistence.xml file), should be placed in the 'Web.config' file.
- The 'configSections' tag inside the Web.config file should mention 'NPersistence.ConfigurationSectionHandler' as one of the sections.
Examples
CopyC#
<configuration> ... <configSections> <section name="persistence-unit" type="NPersistence.ConfigurationSectionHandler, NPersistence" /> </configSections> ... <persistence-unit name="examplePersistenceUnit"> <provider>NPersistence.NHibernate.NHibernatePersistence</provider> <class>tests.Employee</class> <properties> <property name="connection.provider" value="NHibernate.Connection.DriverConnectionProvider"/> <property name="dialect" value="NHibernate.Dialect.MySQL5Dialect"/> <property name="connection.driver_class" value="NHibernate.Driver.MySqlDataDriver"/> <property name="connection.connection_string" value="server=srvName; user id=usrName; password=pass; database=test"/> </properties> </persistence-unit>
Assembly: NPersistence (in NPersistence.dll) Version: 2.0.0.0 (2.0.0.0)
Syntax
C# |
public class ConfigurationSectionHandler : IConfigurationSectionHandler
Members
All Members | Constructors |
Public Protected | Instance Static | Declared Inherited | XNA Framework Only .NET Compact Framework Only |
Member | Description | |
---|---|---|
ConfigurationSectionHandler()()()() | Initializes a new instance of the ConfigurationSectionHandler class |
Inheritance Hierarchy
System..::..Object
NPersistence..::..ConfigurationSectionHandler
NPersistence..::..ConfigurationSectionHandler