Пример #1
0
        public virtual void EndBatch()
        {
            var sql      = _stringBuilder.ToString();
            var sqlBatch = new SqlBatch(sql);

            sqlBatch.SuppressTransaction = _transactionSuppressed;

            if (!string.IsNullOrEmpty(sql))
            {
                _batches.Add(sqlBatch);
            }

            _stringBuilder = new IndentedStringBuilder();
        }
Пример #2
0
        public virtual SqlBatchBuilder EndBatch()
        {
            var sql = _stringBuilder.ToString();
            var sqlBatch = new SqlBatch(sql);
            sqlBatch.SuppressTransaction = _transactionSuppressed;

            if (!string.IsNullOrEmpty(sql))
            {
                _batches.Add(sqlBatch);
            }

            _stringBuilder = new IndentedStringBuilder();

            return this;
        }