NHibernate ISession Flush: Where and when to use it, and why?
Briefly: Always use transactions Don’t use Close(), instead wrap your calls on an ISession inside a using statement or manage the lifecycle of your ISession somewhere else. From the documentation: From time to time the ISession will execute the SQL statements needed to synchronize the ADO.NET connection’s state with the state of objects held in … Read more