예제 #1
0
        private void ExecuteManyBatched(IEnumerable <string> statements)
        {
            var groups = SplitOnEmptyEntries(statements);

            foreach (var group in groups)
            {
                var batch = driver.BuildBatch(group.ToArray());
                if (string.IsNullOrEmpty(batch))
                {
                    return;
                }

                using var command = connection.CreateCommand(batch);
                driver.ExecuteNonQuery(session, command);
            }
        }