NHibernate.Linq LockMode

Can I install LockMode when using NHibernate.Linq? When using ICriteria, I can as follows:

var criteria = Session.CreateCriteria<Foo>();
criteria.SetLockMode(LockMode.None);
criteria.Add(Expression.Eq("Title", title));

Is it possible to build the same query using Nhibernate.Linq?

+5
source share
2 answers

I don’t think so ... I just met NHibernate.Linq source code and its tests and did not find a link to LockMode.

+2
source

You can still achieve object lock using Session.Lock (entity, LockMode.read)

thanks

+2
source

All Articles