DbExpressions.OracleQueryTranslator.VisitBatchExpression C# (CSharp) Method

VisitBatchExpression() protected method

Translates the batchExpression into a string representation.
protected VisitBatchExpression ( DbBatchExpression batchExpression ) : DbExpression
batchExpression DbBatchExpression The to translate.
return DbExpression
        protected override DbExpression VisitBatchExpression(DbBatchExpression batchExpression)
        {
            if (batchExpression.Count() == 0)
                return ExpressionFactory.Sql(string.Empty);
            var sb = new StringBuilder();
            sb.AppendLine("begin ");
            foreach (var dbExpression in batchExpression)
            {
                sb.AppendFormat(1, "{0};", Visit(dbExpression));
                sb.AppendLine();
            }
            sb.AppendLine(" end;");
            return ExpressionFactory.Sql(sb.ToString());
        }