0
의사 코드로 설명하려고 시도합니다.트랜잭션에 대한 nhibernate 세션 문제
는 두 개의 세션 S1과 S2
INT totalEntity = 0이있어; 내가 S2를 실행하면 s1.Transaction가 최선을 다하고 때문이
Thread1
{
s1.BeginTransaction();
loop (infinite)
{
totalEntity = s1.List<Entity>().Count();
}
s1.EndTransaction();
}
s2.BeginTransaction();
s2.Insert<Entity>();
s2.EndTransaction();
는 totalEntity는 여전히 제로이다. 루프에서 실제 totalEntity를 1로 어떻게 얻을 수 있습니까?
어떤 데이터베이스를 사용하고 있습니까? 어떤 트랜잭션 격리 수준입니까? –