title: Matching Array<SqlParameter> to output of SqlParser.Parser?
body: <h2>Background</h2>
  
  <p>As part of a database-facing application, we've found it necessary to construct and pass parameterized queries into an otherwise EntityFramework application, usually to bridge multiple client databases. We do this through pretty standard syntax:</p>
  
  <pre><code>context.Database.SqlQuery&lt;ReturnModel&gt;(queryString, sqlParameters)
  </code></pre>
  
  <p>queryString is a string, sqlParameters is an Array of SqlParameter objects.</p>
  
  <h2>Testing</h2>
  
  <p>As we build additional automated testing into the application I've found it helpful to use SqlParser as an "offline" tester. It won't catch everything, but I can do:</p>
  
  <pre><code>var parseResults = Parser.Parse(queryString);
  Assert.That(parseResults.Errors, Is.Empty);
  </code></pre>
  
  <p>and make sure that we're not introducing any syntax errors into the parameterized query string.</p>
  
  <p>I'd also like to be able to verify that we don't have any missing parameters in the generated parameter list; parameters expected in the query string, but not provided. Is there any way I can match sqlParameters against something in parseResults to do this, or make use of other features of the Microsoft.SqlServer.Management library?</p>