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

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

            return(response.CommitId);
        }
        ITransaction IDatabase.CreateTransaction(IsolationLevel isolationLevel)
        {
            if (isolationLevel == IsolationLevel.Unspecified)
            {
                isolationLevel = IsolationLevel.Serializable;
            }

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


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

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

            return response.CommitId;
        }