摘要: Nhibernate事务的使用: public void Add(Customer customer) { ISession session = _sessionManager.GetSession(); ITransactio... 阅读全文
posted @ 2014-05-27 20:32 easy5 阅读(234) 评论(0) 推荐(0)
摘要: 相关资料:http://www.cnblogs.com/lyj/archive/2008/10/29/1322373.html问题的提出:1.延迟加载,可能会引起session已经关闭的异常,例如:当实现延迟加载,当需要Orders时,会通过session去查询,session。但此时,由于sess... 阅读全文
posted @ 2014-05-27 03:17 easy5 阅读(533) 评论(0) 推荐(0)
摘要: 这篇文章http://ayende.com/blog/3988/nhibernate-the-difference-between-get-load-and-querying-by-idOne of the more common mistakes that I see people doing w... 阅读全文
posted @ 2014-05-27 01:10 easy5 阅读(310) 评论(0) 推荐(0)