예제 #1
0
        public int BeginTransaction(IsolationLevel isolationLevel)
        {
            var response = SendMessage(new BeginRequest(isolationLevel))
                           as BeginResponse;

            if (response == null)
            {
                throw new InvalidOperationException();
            }

            return(response.CommitId);
        }
예제 #2
0
        ITransaction IDatabase.CreateTransaction(IsolationLevel isolationLevel)
        {
            if (isolationLevel == IsolationLevel.Unspecified)
            {
                isolationLevel = IsolationLevel.Serializable;
            }

            if (isolationLevel != IsolationLevel.Serializable)
            {
                throw new NotSupportedException();
            }


            return(CreateTransaction());
        }
예제 #3
0
        public int BeginTransaction(IsolationLevel isolationLevel)
        {
            var response = SendMessage(new BeginRequest(isolationLevel))
                as BeginResponse;

            if (response == null)
                throw new InvalidOperationException();

            return response.CommitId;
        }