Skip to content

Instantly share code, notes, and snippets.

@jferguson
Created January 26, 2012 09:12
Show Gist options
  • Save jferguson/1681888 to your computer and use it in GitHub Desktop.
Save jferguson/1681888 to your computer and use it in GitHub Desktop.
Usage of SqlBulkCopy a Generic List<T>
var imports = new List<Product>();
//Load up the imports
//Pass in cnx, tablename, and list of imports
BulkInsert(context.Database.Connection.ConnectionString, "Products", imports);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment