nhibernate学习1-配置
<configSections>
<section
name="hibernate-configuration"
type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate"
/>
</configSections>
引用一个ConfigurationSectionHandler类,这个类的具体作用,是用来读取nhibernate的配置项的信息,创建sessionfactory工厂。
以下就是配置项
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="connection.connection_string">
Server=(local);initial catalog=quickstart;Integrated Security=SSPI
</property>
<mapping assembly="QuickStart" />
</session-factory>
</hibernate-configuration>
至此sessionfactory工厂,的配置,就完成了。