title: Entity Framework enumerating SqlQuery result
body: <p>I have strange error while I am trying to view results of SqlQuery:</p>
  
  <pre><code>var sql = "SELECT @someParam";
  var someParamSqlParameter = new SqlParameter("someParam", "Some Value");
  var result = _dbContext.SqlQuery&lt;string&gt;(sql, someParamSqlParameter);
  var containsAnyElements = result.Any();
  </code></pre>
  
  <p>So when debugger is at last line and when I try to expand Results View of <strong>result</strong> it shows me expected <code>result("Some Value")</code> but on invoking last line I got an exception </p>
  
  <blockquote>
    <p><em>"The SqlParameter is already contained by another
    SqlParameterCollection.".</em></p>
  </blockquote>
  
  <p>It looks like when I try to open Result View of <strong>result</strong> it invokes this query again. If that behavior correct? If yes, please explain why that happens.</p>