title: Using an IEnumerable<Anonymous Type> within Dynamic Type View
body: <pre><code>var s = myInventoryEntities.p_Forms().Select(i =&gt; new  { i.Customer, i.Order_ID }).Distinct().ToList();
  
  ViewBag.MyData = s;
  
  return View();
  </code></pre>
  
  <p>this gives me</p>
  
  <pre><code>    { Customer = "Bob", Order_ID = 2644550 }
  </code></pre>
  
  <p>In my razor code</p>
  
  <p>i traverse the data</p>
  
  <pre><code>@foreach ( var x in @ViewBag.MyData){
  x.Customer // Does not exist! :(
  }
  </code></pre>
  
  <p>Please help!</p>
  
  <p>'object' does not contain a definition for 'Customer'</p>