title: Does not contain a public definition for 'GetEnumerator' in MVC
body: <p>I am trying to solve this from 2 days.</p>
  
  <p>The <strong>error is</strong></p>
  
  <blockquote>
    <p>Compiler Error Message: CS1579: foreach statement cannot operate on
    variables of type
    'mvc_ado.net_crud.Models.BusinessObject.ContactPerson' because
    'mvc_ado.net_crud.Models.BusinessObject.ContactPerson' does not
    contain a public definition for 'GetEnumerator'</p>
  </blockquote>
  
  <p>My controller</p>
  
  <pre><code>    public ActionResult List()
      {
          var model = ContactPersonManager.GetList();
          return View(model);
      }
  </code></pre>
  
  <p>In my model</p>
  
  <pre><code> public static ContactPersonList GetList()
      {
          ContactPersonList tempList = null;
          using (var myConnection = new SqlConnection(AppConfiguration.ConnectionString))
          {
              var myCommand = new SqlCommand("uspContactPersonSelectList", myConnection) { CommandType = CommandType.StoredProcedure };
              myConnection.Open();
              using (var myReader = myCommand.ExecuteReader())
              {
                  if (myReader.HasRows)
                  {
                      tempList = new ContactPersonList();
                      while (myReader.Read())
                      {
                          tempList.Add(FillDataRecord(myReader));
                      }
                  }
                  myReader.Close();
              }
          }
          return tempList;
      }
  </code></pre>
  
  <p>My view</p>
  
  <pre><code>    @foreach (var person in Model)
      {
          &lt;ul&gt;
              &lt;li&gt;
                  @person.ID;
              &lt;/li&gt;
          &lt;/ul&gt;
      }
  </code></pre>
  
  <p>Am i missing or doing thing's wrong?</p>