Skip to content

Instantly share code, notes, and snippets.

@ronnieoverby
Created February 16, 2013 18:47
Show Gist options
  • Select an option

  • Save ronnieoverby/4968171 to your computer and use it in GitHub Desktop.

Select an option

Save ronnieoverby/4968171 to your computer and use it in GitHub Desktop.
static void BulkInserterExample(string connectionString, IEnumerable<Person> people)
{
using (var sqlConnection = new SqlConnection(connectionString))
{
var bi = new BulkInserter<Person>(sqlConnection, "People", batchSize: 2000);
sqlConnection.Open();
bi.Insert(people);
sqlConnection.Close();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment