title: Entity Framework ExecuteStoreQuery with anonymous type
body: <p>I'm trying to create a generic method to get data from SQL Server by one stored procedure, but it doesn't return any data:</p>
  
  <pre><code>public static IEnumerable&lt;T&gt; Select&lt;T&gt;(string SQL)  
  {
    string spName = "exec spGetData @SQL";
    var parametros = new object[]{
                                  new SqlParameter("@SQL", SQL)
                                };
    IEnumerable&lt;T&gt; result;
    using (DBContext db = new DBContext())
    {
      result = from a in db.ObjectContext.ExecuteStoreQuery&lt;T&gt;(spName, parametros).ToList() select a;
    }
    return result;
  }
  </code></pre>
  
  <p>Someone could help me?</p>