After having learned so much about NHibernate, it is time to think about some scenarios which can lead us to use NHibernate in the wrong way if we do not pay attention and can lead to a system which is unsatisfactory. One of the most obvious side effects of wrong usage or configuration of NHibernate is bad performance. Our application starts to crawl and in some situations even times out.
In this chapter we shall discuss some of the most frequent mistakes developers make when using NHibernate. We will also show how to do it right. The topics discussed are: