Hi all,
I use NHibernate 2.1 GA, ASP.NET 3.5 connect to MS SQL Express. I'm successful with session.insert(), but unsuccessful with delete() and update() in one single object. When I run my test, it run well, but when checking my database, I found it didn't change in my database.
Eg.
I have a table Room and data in it:
Code:
Id:2
Name: 302A
Price: 30$
I want to change price into 35$, I use session.update(), it ran well but there's not changing in my database. And the same for delete() commandI don't know why. Please help me.
This is my config part for NHibernate in Web.config:
Code:
<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.driver_class">NHibernate.Driver.SqlClientDriver</property>
<property name="connection.connection_string">
Data Source=QUANG\SQLEXPRESS;Initial Catalog=HotelManager;Integrated Security=True
</property>
<property name='proxyfactory.factory_class'>NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu</property>
<!--HBM Mapping files-->
<mapping assembly='HotelManager.Core'/>
</session-factory>
</hibernate-configuration>