Question

Is it possible to set the LockMode when using NHibernate.Linq? When using ICriteria I can this way:

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

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

Was it helpful?

Solution

I don't think so... I just grepped through the NHibernate.Linq source code and its tests and found no reference to LockMode.

OTHER TIPS

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

Thanks

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top