NHibernate simple Hibernate config file: hibernate.cfg.xml


SQL Server Version

xmlversion=”1.0″ encoding=”utf-8″?>
<!– This is the System.Data.dll provider for SQL Server –>

<hibernate-configuration xmlns=”urn:nhibernate-configuration-2.2″ >
<session-factory name=”NHibernate.WebSQL”>

<property name=”connection.provider”>NHibernate.Connection.DriverConnectionProvider</property>
<property name=”connection.driver_class”>NHibernate.Driver.SqlClientDriver</property>
<property name=”connection.connection_string”>Server=serverInfowillbehere;User Id=username;Password=password;</property>
<property name=”dialect”>NHibernate.Dialect.MsSql2005Dialect</property>
<property name=”adonet.batch_size”>10</property>
<property name=”show_sql”>false</property>

<property name=”use_outer_join”>true</property>
<property name=”command_timeout”>444</property>
<property name=”query.substitutions”>true 1, false 0, yes ‘Y’, no ‘N'</property>

<mapping assembly=’Weditor.Core’ />

</session-factory>
</hibernate-configuration>

ORACLE version

xmlversion=”1.0″ encoding=”utf-8″?>
<!– This is the System.Data.dll provider for SQL Server –>
<hibernate-configuration xmlns=”urn:nhibernate-configuration-2.2″ >

<session-factory name=”NHibernate.WebORACLE”>
<property name=”connection.provider”>
NHibernate.Connection.DriverConnectionProvider
</property>

<property name=”connection.driver_class”>
NHibernate.Driver.OracleClientDriver
</property>
<property name=”connection.connection_string”>
Data Source=serverInfowillbehere;User Id=username;Password=password;

</property>
<property name=”dialect”>NHibernate.Dialect.Oracle9Dialect</property>
<property name=”command_timeout”>444</property>

<property name=”query.substitutions”>true 1, false 0, yes ‘Y’, no ‘N'</property>
<mapping assembly=’targetprojects.core’ />
</session-factory>
</hibernate-configuration>

Advertisements