title: DacServices Rollback if new constraint validation fails
body: <p>We are updating our databases using the <code>DacServices</code>. However sometimes new constraints get added that cause Constraint Violations, which require us to write a migration script to make sure the Data in the column is valid. </p>
  
  <p>However with the <code>DacServices.Deploy</code> if the <code>ScriptNewConstraintValidation</code> option is true and the new constraint errors, I cannot figure out how to rollback the changes made by the DacServices. </p>
  
  <p>We are using the AlwaysOn Availability so performing a backup/restore would be extremely difficult. Below is one way I have tried with no success.</p>
  
  <pre><code>var dacServices = new DacServices(dbConnection.ConnectionString);
  var deploymentOptions = new DacDeployOptions
  {
      CreateNewDatabase = createNewDatabase,
      ScriptDatabaseCompatibility = false,
      ScriptDatabaseCollation = false,
      IgnoreUserSettingsObjects = true,
      DropPermissionsNotInSource = false,
      DropRoleMembersNotInSource = false,
      IgnorePermissions = true,
      IgnoreRoleMembership = true,
      GenerateSmartDefaults = true,
      IncludeTransactionalScripts = true,
      ScriptNewConstraintValidation = true
  };
  
  Microsoft.SqlServer.Dac.DacPackage dacPackage = DacPackage.Load(dacPath);
  
  Console.WriteLine("Deploying DacPac");
  CancellationTokenSource tokenSource = new CancellationTokenSource();
  try
  {
      dacServices.Deploy(dacPackage, databaseName, true, deploymentOptions, tokenSource.Token);
  }
  catch(Exception)
  {
      tokenSource.Cancel();
  }
  </code></pre>