NHibernate Custom Queries Code Review
Define NHibernate Application Configuration
Code Review
- NHibernate Custom Queries Code Review: Define Person, Role and Salary Classes
- NHibernate Custom Queries Code Review: Mapping the Class and Database Objects Using XML Mapping File
- NHibernate Custom Queries Code Review: Define NHibernate Application Configuration
- NHibernate Custom Queries Code Review: Manipulate the Database using NHibernate
Code Walkthrough
The following XML elements are used to configure the NHibernate ISessionFactory object:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property>
<property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
<property name="connection.connection_string">Server=SQLEXPRESS;Initial Catalog=Foo;Integrated Security=SSPI</property>
<property name="hibernate.show_sql">False</property>
<mapping assembly="PersonNHibernateStoredProc_2_0" />
</session-factory>
</hibernate-configuration>
- connection.provider : NHibernate connection provider.
- dialect : NHibernate database dialect.
- connection.driver_class : NHibernate driver class.
- connection.connection_string : Source database connection string.
- hibernate.show_sql : whether or not to output the NHibernate generated SQL to the console.
- mapping assembly : specifies the default .NET namespace to use.
Printer Friendly Version
Add to Favourites
DotNet Kicks
Digg
del.icio.us
Live Favourites
ma.gnolia
reddit
Slashdot
Technorati
Yahoo!