title: Problem with using a ToExpando method
body: <p>Hi I i try to use a ToExpando solution to use anonymous classes in razor views.
  I use this solution -> <a href="https://stackoverflow.com/questions/5120317/dynamic-anonymous-type-in-razor-causes-runtimebinderexception/5670899#5670899">Dynamic Anonymous type in Razor causes RuntimeBinderException</a></p>
  
  <p>I'll write what i did:</p>
  
  <ol>
  <li><p>I added a file Extensions.cs where i put following code:</p>
  
  <pre><code>public static class Extensions
  {
      public static ExpandoObject ToExpando(this object anonymousObject)
      {
          IDictionary&lt;string, object&gt; anonymousDictionary = HtmlHelper.AnonymousObjectToHtmlAttributes(anonymousObject);
          IDictionary&lt;string, object&gt; expando = new ExpandoObject();
          foreach (var item in anonymousDictionary)
              expando.Add(item);
          return (ExpandoObject)expando;
      }
  }
  </code></pre></li>
  <li><p>I wrote a query that receive a tuples from database in controller method:</p>
  
  <pre><code>IEnumerable&lt;dynamic&gt; articles = (from p in db.Articles.Where(p =&gt; p.user_id == 2)
          select new
          {
              p.article_id,
              p.title,
              p.date,
              p.category,
              AverageScore = db.Articles_Scores
                  .Where(o =&gt; o.user_id == p.user_id &amp;&amp; p.article_id == o.article_id)
                  .Average(m =&gt; m.score)
          }).AsEnumerable()
            .Select(r =&gt; r.ToExpando());
  int ii = 0;
  foreach(var it in articles) {
      // HERE I CAN READ EVERYTHING
      ii = it.article_id;
  }
  return View(articles);
  </code></pre></li>
  <li><p>In view I declare a model:</p>
  
  <pre><code>@model IEnumerable&lt;dynamic&gt;
  </code></pre></li>
  <li><p>And I try to get every tuples:</p>
  
  <pre><code>@foreach (dynamic item in Model) {
  // some code
      @item.article_id // HERE IS EXCEPTION
  }
  </code></pre></li>
  </ol>
  
  <p>In the foreach line I got an Exception:</p>
  
  <p><strong>RuntimeBinderException</strong>: <em>'System.Dynamic.ExpandoObject' does not contain a definition for 'article_id'</em></p>
  
  <p>What did I do wrong?</p>