Hello all,
Please, have a look at this code and tell me what's happening and why.
Code:
//first, i create a businnes object and define its ID
BusinessObject obj = new BusinessObject (id);
// secondly, I use NHibernateSession in order to get that object with the data stored in the database
BusinessObject obj = NHibernateSession.Get(obj);
obj.Property = "new value";
...
...
...
last code of the page
after I have defined a new value to property it's called other codes of the application, but NHibernateSession is never called so that to update the new value in the database.
but when I take a look at database the data is updated.
I wouldn't like to leave this behavior...in my case I use NHibernateSession to update explicitly.
So, How to avoid that ?