title: ExecuteNonQuery is not resolving parameters passed to it
body: <p>I am attempting to add the variable <code>newRetentionLimit</code> to a table in Microsoft SQL Server. I pass the value I want to insert into a parameter and then run <code>ExecuteNonQuery</code>. I get no errors back but the <code>newRetentionLimit</code> isn't placed into the table. I have debugged to make sure that <code>newRetentionLimit</code> isn't null and is an actual integer.</p>
  <p>The problem appears to be that <code>ExecuteNonQuery</code> isn't retrieving the parameter value based on the name I put in the script. It appears its just trying to run the script with the parameter name. Anyone have any idea why?</p>
  <pre><code>if (request.SystemSettings.Any(s =&gt; s.SettingName.Equals(&quot;HISTORYRETENTIONDAYS&quot;)))
  {
      var entities = entityRepo.GetList();
  
      var newRetentionLimit = request.SystemSettings.Find(setting =&gt; setting.SettingName.Equals(&quot;HISTORYRETENTIONDAYS&quot;)).SettingValue.ToInt();
      var requestContext = new RequestContext();
  
      var sqlParameter = new List&lt;SqlParameter&gt; {
                      SqlParameterMaker.MakeTypedValueParameter(&quot;@retentionValue&quot;,newRetentionLimit, SqlDbType.Int)
      };
  
      foreach (var entity in entities)
      {
          var sql = $@&quot;ALTER TABLE [data].[t{entity.Name}] SET (SYSTEM_VERSIONING = ON (HISTORY_TABLE = [hist].[t{entity.Name}], HISTORY_RETENTION_PERIOD = @retentionValue DAYS));&quot;;
          requestContext.DatabaseContext.ExecuteNonQuery(sql, sqlParameter);
      }
  }
  </code></pre>