Skip to content

Conversation

smithkl42
Copy link

The code for bulk insertion currently iterates through the items twice: once when counting them to determine batch size, and once when actually inserting them. This is more-or-less harmless for a List<T> datasource, but is problematic when you're generating items (as I was) via a yield return kind of construct. I don't think that there's any problem with having a batch size larger than the actual batch, so the simplest way to handle it was just to stop the first (counting) iteration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant