Skip to content

Instantly share code, notes, and snippets.

@Jtorrecilla
Created February 14, 2016 19:56
Show Gist options
  • Select an option

  • Save Jtorrecilla/de75017160d8f73b9d26 to your computer and use it in GitHub Desktop.

Select an option

Save Jtorrecilla/de75017160d8f73b9d26 to your computer and use it in GitHub Desktop.
using (var copier = new SqlCopy.SqlCopy(new SqlServerQueryGeneration(), new SqlConnection("Data source=.; Initial Catalog=CopyDbSample;User Id=sa;Password=password"), new SqlConnection("Data source=.; Initial Catalog=CopyDbSample;User Id=sa;Password=password")))
{
copier.CopyData<Customer>();
copier.CopyData<Product>();
copier.CopyData<Order>();
copier.CopyData<OrderDetail>();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment