insert into,select all work correctly. when i update the data ,it not update to the sql server(as no sql exec to server,in the server is the old data not be updated). but when select to this record,it return the updated data has been updated. after i restart the iis server , sql server return the old data not be bu updated by selecting .
Asked
Active
Viewed 69 times
-1
-
Welcome to stack overflow - please read the http://stackoverflow.com/tour and see if you can reword your question a little better to get best results. – BugFinder Mar 15 '16 at 09:26
-
@BugFinder This is NHibernate Log:loading entity->attempting to resolve-> resolved object in session cache->after autocommit->transaction completion-> aggressively releasing database connection->Start Commit->before transaction completion->IDbTransaction Committed->transaction completion->aggressively releasing database connection->Closing connection->IDbTransaction disposed-> closing session – 徐先美 Mar 15 '16 at 11:06
-
Please edit the text in your question (instead of commenting) to add the additional information when it is such an important part of the question itself. – Oskar Berggren Mar 15 '16 at 19:24
-
Please add some code that show what you are doing. – Oskar Berggren Mar 15 '16 at 19:24
1 Answers
0
Unfortunately you are not showing the problematic code in your question, but my guess is that you should review your handling of sessions and transaction.
Consider reviewing the quick start chapter of the NHibernate reference, particularly the notes on using and committing transactions. Also read the chapter on Manipulating Persistent Data.

Oskar Berggren
- 5,583
- 1
- 19
- 36