title: Why given code is generating 'The request limit for the database is X' with Azure SQL
body: <p>So I have code running in Azure Functons Consumption Plan. My database is limited to 60 concurrent logins or something that is generating this error:</p>
  
  <pre><code>The request limit for the database is X
  </code></pre>
  
  <p>My questions is, why this loop within transaction is geting this limit? One transactions is one request? Or not? I know that code is in poor quality, but this is only because I was playing with hardcore solutions during my search.</p>
  
  <pre><code>SOME_QUERY1 = "INSERT INTO SomeTable (p1,p2,p3,p4) Values (p1,p2,p3,p4); SELECT CAST(SCOPE_IDENTITY() as int)";
  SOME_QUERY2 = "INSERT INTO OtherTable (10 fields)"; 
  
  public async Task&lt;IEnumerable&lt;string&gt;&gt; SaveBusinessTransaction(TransactionBatchEntity businessEntity)
  {
      using (var connection = new SqlConnection(_connectionString))
      {
          connection.Open();
          var successfullyAddedTransactions = new List&lt;string&gt;();
  
          using (var transaction = connection.BeginTransaction())
          {
              try
              {
                  var transactionId = (await connection.QueryAsync&lt;int&gt;(SOME_QUERY1, new { Paramter = 1 }, transaction)).Single();
  
                  foreach (var details in businessEntity.Details)
                  {
                      var detailsEntity = new
                      {
                          //some fields
                      };
  
                      await connection.ExecuteAsync(SOME_QUERY2, detailsEntity, transaction);
                      successfullyAddedTransactions.Add(detailsEntity.TransactionNumber);
                  }
  
                  transaction.Commit();
  
                  return successfullyAddedTransactions;
              }
              catch (Exception)
              {
                  transaction.Rollback();
                  connection.Close();
                  throw;
              }
          }
      }
  }
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>IMPORTANT missing part with an execution context</p>
  
  <pre><code>transactions.ForEach(t =&gt; _sqlService.SaveBusinessTransaction(t));
  </code></pre>