-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Carlos Martínez edited this page Mar 23, 2014
·
1 revision
Para configurar existen la siguiente sección
<configuration> <configSections> <section name="simplelabs.framework" type="Simplelabs.Framework.Configuration.FrameworkSettings, Simplelabs.Framework"/> </configSections> <simplelabs.framework> <nhibernate sessionManager="web"> <sessions> <add name="default" virtualPath="~/NHibernate.config"/> </sessions> </nhibernate> </simplelabs.framework> <connectionStrings> <add name="FrameworkTest" connectionString="Data Source=.;Initial Catalog=FrameworkTest;Integrated Security=True" providerName="System.Data.SqlClient"/> </connectionStrings> <system.web> <httpRuntime targetFramework="4.5"/> <compilation debug="true" targetFramework="4.5"/> </system.web> <system.webServer> <validation validateIntegratedModeConfiguration="false"/> <modules> <add name="simplelabs.NHibernate" type="Simplelabs.Framework.Persistence.NHibernate.NHibernateHttpModule, Simplelabs.Framework"/> </modules> </system.webServer> </configuration>
Luego el archivo de configuración para NHibernate.config
<?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.Spatial.Dialect.MsSql2012GeometryDialect, NHibernate.Spatial.MsSql</property> <property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property> <property name="connection.connection_string_name">FrameworkTest</property> <property name="connection.isolation">ReadCommitted</property> <property name="current_session_context_class">web</property> <property name="generate_statistics">true</property> <property name="cache.provider_class">NHibernate.Caches.SysCache.SysCacheProvider, NHibernate.Caches.SysCache</property> <property name="cache.use_query_cache">true</property> <property name="cache.use_second_level_cache">true</property> <mapping assembly="Domain" /> </session-factory> </hibernate-configuration>