Exemple #1
0
        public void BeginTransactionScope(SimplifiedIsolationLevel isolationLevel)
        {
            if (transactionScope != null)
            {
                throw new InvalidOperationException("Cannot begin another transaction scope");
            }

            transactionScope = contextBuilder.Context.Database.BeginTransaction((System.Data.IsolationLevel)isolationLevel);
        }
            public void BeginTransactionScope(SimplifiedIsolationLevel isolationLevel)
            {
                if (transactionScope != null)
                {
                    throw new InvalidOperationException("Cannot begin another transaction scope");
                }

                transactionScope = new TransactionScope(TransactionScopeOption.Required, new TransactionOptions {
                    IsolationLevel = (IsolationLevel)isolationLevel
                });
            }