One of the things that make NHibernate easy to use is that it fully support the POCO model. But one of the things that most people do not consider is that since NHibernate did the hard work of opening up the seams to allow external persistence concer…
参考:http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html 但这个方法还不能解决Session缓存问题,由于创建Session需要消耗大量的内存,参考上面的方法,当请求并发的时候,内存不断的增加. 在网上找了很多种方法都没有解决.下面贴上主要代码: 1.接口请参考上面文章 using NHibernate; using System; using System.Collections.Generic; using Syste…