R
R
Rifat2017-02-08 20:09:44
Hibernate
Rifat, 2017-02-08 20:09:44

What is ISession.Lock() for?

Can someone explain in accessible Russian what this construction does, in what cases it should be used?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Axian Ltd., 2017-02-09
@serber

Judging by the documentation nhibernate.info/doc/nhibernate-reference/transacti...
an explicit lock, depending on the previously set LockMode. In this case, a forced check of the data version is carried out. Used, as shown in the example, to ensure the correct version of the data (perhaps updated in another session) before updating itself.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question