title: XML to List<T> in MVC 4
body: <p>I'm calling a webservice, which returns XML with students. I need to store all students in my database (existing student table). </p>
  
  <p>Right now I have this XMLStudentParser class that gets the XML, but I'm lost at how to proceed in storing each student record to the database. Do I use the XMLReader to loop through the students and add each student to a <code>List&lt;Student&gt;</code>, and then save that list to the database?</p>
  
  <p><strong>Remote XML via webservice.</strong> </p>
  
  <pre><code>&lt;Response&gt;
    &lt;Result&gt;True&lt;/Result&gt;
    &lt;Table&gt;
      &lt;Students&gt;
        &lt;Student&gt;
          &lt;StudentID&gt;14165&lt;/StudentID&gt;
          &lt;StudentName&gt;Jeff Smith&lt;/StudentName&gt;
          &lt;GroupId&gt;9109&lt;/GroupId&gt;
        &lt;/Student&gt;
        &lt;Student&gt;
          &lt;StudentID&gt;14168&lt;/StudentID&gt;
          &lt;StudentName&gt;Mary Jones&lt;/StudentName&gt;
          &lt;GroupId&gt;9109&lt;/GroupId&gt;
        &lt;/Student&gt;
      &lt;/Students&gt;
    &lt;/Table&gt;
  &lt;/Response&gt;
  </code></pre>
  
  <p><strong>My Student model</strong></p>
  
  <pre><code>public class Student
  {
      public int StudentId { get; set; }
      public string FullName { get; set; }
  
      public int GrpId { get; set; }
  }
  </code></pre>
  
  <p>How would the best practice code look to:</p>
  
  <ul>
  <li>Get the XML from the webservice</li>
  <li>Parse each student</li>
  <li>Store each student in the database</li>
  </ul>