title: How to run dynamic SQL query in Entity Framework 7 that auto-maps to Entities (SqlQuery<T>)?
body: <p>I have an existing app that I am trying to upgrade from MVC5/EF6 to MVC6/EF7.  We dynamically create some of our SQL tables, and as a result, have made use of the</p>
  
  <pre><code>System.Data.Entity.Database.SqlQuery
  </code></pre>
  
  <p>method to automatically map to entities that we use throughout our application.</p>
  
  <p>This method seems to have gone away (i.e. not part of 
       Microsoft.Data.Entity.Infrastructure.Database    ) in EF7 (or is not yet implemented).  Are there plans to re-implement this method in EF7 or is there another way to accomplish this?  Our project is kind of dead in the water until we figure this out.</p>
  
  <p><strong><em>Edited on May 20, 2015</em></strong></p>
  
  <p>I've been trying to make this work with FromSql, since that's what's available in Beta4, but no matter what combination of concatenated string, parameters I try, I keep getting different versions of an "Incorrect Syntax near @xxxvariable" message. </p>
  
  <pre><code>var results = Set&lt;AssessmentResult&gt;().FromSql("dbo.GetAssessmentResults @FieldA='Data1', @FieldB='Data2', @UserId = 2303"); 
  var results2 = Set&lt;AssessmentResult&gt;().FromSql("dbo.GetAssessmentResults @FieldA= {0}", intData); 
  </code></pre>
  
  <p>Both of these calls result in</p>
  
  <pre><code>"Incorrect syntax near '@FieldA'" 
  </code></pre>
  
  <p>Any ideas? </p>