title: Is there a difference SMO ServerConnection transaction methods versus using the SqlConnectionObject property?
body: <p>I am using SMO to create databases and tables on a SQL Server.  I want to do so in a transaction.  Are both of these methods of doing so valid and equivalent:</p>
  
  <p>First method:</p>
  
  <pre><code>Server server;
  //...
  server.ConnectionContext.BeginTransaction();
  //...
  server.ConnectionContext.CommitTransaction();
  </code></pre>
  
  <p>Second method:</p>
  
  <pre><code>Server server;
  // ...
  SqlConnection conn = server.ConnectionContext.SqlConnectionObject;
  SqlTransaction trans = conn.BeginTransaction();
  // ...
  trans.Commit();
  </code></pre>