title: looping through model with razor
body: <p>Trying to just print out the name of each movie item. </p>
  
  <p>eg.</p>
  
  <ul>
       <li>The Dark Knight</li>
  </ul>
  
  <p>Am I missing some declarative statement in the razor code? Intellisense doesn't list any options after Model</p>
  
  <pre><code> [XmlRoot("movies")]
        public class MovieSummary
        {
           [XmlElement("movie")]
           public List&lt;Movie&gt; Movies { get; set; }
        }
  
        public class Movie
        {
           public int id { get; set; }
           public string name { get; set; }
        }
  
        public ActionResult Index()
        {
           MovieSummary summary = Deserialize();
           return View(summary);
        }
  
        public static MovieSummary Deserialize()
        {
           using (TextReader reader = new StreamReader("c:\\movies.xml"))
           {
              XmlSerializer serializer = new XmlSerializer(typeof(MovieSummary));
              return (MovieSummary)serializer.Deserialize(reader);
           }
        }
  
        &lt;?xml version="1.0" ?&gt; 
        &lt;movies xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
         &lt;movie&gt;
          &lt;id&gt;1&lt;/id&gt;
          &lt;name&gt;The Dark Knight&lt;/name&gt;
         &lt;/movie&gt;
         &lt;/movies&gt;
  
        &lt;ul&gt;
        @if (Model != null) {
             foreach (var movies in Model.Movies) 
             {
                  &lt;li&gt;@movies.movie.name&lt;/li&gt;
             }
        }
        &lt;/ul&gt;
  </code></pre>