NHibernate 中如何处理并发? [英] How do you deal with concurrency in NHibernate?

查看:18
本文介绍了NHibernate 中如何处理并发?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你如何使用 NHibernate 支持乐观/悲观并发?

How do you support optimistic / pessimistic concurrency using NHibernate?

推荐答案

NHibernate 默认支持乐观并发.另一方面,悲观并发可以通过 ISession.Lock() 方法来实现.

NHibernate, by default, supports optimistic concurrency. Pessimistic concurrency, on the other hand, can be accomplished through the ISession.Lock() method.

本文档中详细讨论了这些问题.

These issues are discussed in detail in this document.

这篇关于NHibernate 中如何处理并发?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆