DbExpressions.SQLiteQueryTranslator.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();
            foreach (var dbExpression in batchExpression)
            {
                sb.AppendFormat("{0};", Visit(dbExpression));
                sb.AppendLine();
            }
            return ExpressionFactory.Sql(sb.ToString());
        }