Skip to content

Instantly share code, notes, and snippets.

@heat
Created June 11, 2016 20:01
Show Gist options
  • Save heat/5b68b814d63ec53ff0987c05212bde55 to your computer and use it in GitHub Desktop.
Save heat/5b68b814d63ec53ff0987c05212bde55 to your computer and use it in GitHub Desktop.
using (TransactionScope tc = new TransactionScope())
using (SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["DACL.Properties.Settings.CatalogueConnectionString"].ConnectionString))
{
conn.Open();
attributesTA.Connection = assetTA.Connection = attributeValueTA.Connection = tag2AssetTA.Connection = conn;
assetTA.Update(mainDataSet1.Asset);
attributesTA.Update(mainDataSet1.Attributes);
attributeValueTA.Update(mainDataSet1.AttributeValue);
tag2AssetTA.Update(mainDataSet1.Tag2Asset);
tc.Complete();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment