I have ninject make a new session on httpRequest and close it at the end of the httpRequest.
Now I learned through the nhibernate profile that I should always wrap everything in a transaction even queries(read).
This has caused so many bugs now in my code because I would retrieve an object back from the database and then do modifications to that object(mostly converting the utc time to local time).
These modifications should never be committed to the database but since I am now wrapping all my read queries in a transaction what requires a commit when I go and grab something else out of the database it does a commit and it see's that my object changed and saves the changes that should never be saved to the database.
I would use evict but then I lose lazy loading and I usually convert the times before I actually do some other queries that activate lazy loading.
What should I do?