title: Enlisting in Ambient transactions is not supported using TransactionScope in asp.net core 2 app
body: <p>When opening sql connection inside TransactionScope its giving "Enlisting in Ambient transactions is not supported" error. I am using ado.net in asp.net core 2 app.</p>
  
  <pre><code>        using (var ts = new TransactionScope())
          {
              try
              {
                  Connection.Open();
                  repository.Insert(entity);                    
                  ts.Complete();
              }
  
              catch (Exception ex)
              {
                  ts.Dispose();
              }
              finally
              {
                  Connection.Close();
              }
          }
  </code></pre>