title: Error securing a transaction Entity Framework "_dataContext.Database.BeginTransaction()"
body: <p>I am trying to secure a transaction through Entity Framework. When I use <code>BeginTransaction</code>, ASP.NET throws an exception:</p>
  
  <blockquote>
    <p>The configured execution strategy 'SqlServerRetryingExecutionStrategy' does not support user initiated transactions. Use the execution strategy returned by 'DbContext.Database.CreateExecutionStrategy()' to execute all the operations in the transaction as a retriable unit.</p>
  </blockquote>
  
  <p>This is my code inside the repository </p>
  
  <pre><code>public async Task&lt;EvaluationFormQuestionAnswer&gt; AddScore(EvaluationFormQuestionAnswer evaluationFormQuestionAnswer)
  {
      evaluationFormQuestionAnswer.Id = Guid.NewGuid();
      evaluationFormQuestionAnswer.EvaluatorId = _identityService.Identity.CurrentAccount.Id;
  
      using (var transaction = _dataContext.Database.BeginTransaction())
      {
          try
          {
              var result = await _dataContext.EvaluationFormQuestionAnswer.AddAsync(evaluationFormQuestionAnswer);
              await _dataContext.SaveChangesAsync();
              transaction.Commit();
              return result.Entity;
          }
          catch (Exception ex)
          {
              transaction.Rollback();
              throw new ArgumentException("Error", ex);
          }
      }
  }
  </code></pre>