title: can´t access list attribute in asp net mvc 4 view
body: <p>Might be simple but can´t find why</p>
  
  <p>I cannot access list attributes in my view:</p>
  
  <p>As you can see, I have a class that contains a list of RelacionamentoNomeadoModel class
  <strong>Model:</strong></p>
  
  <pre><code>    public class RelacionamentoNomeadoModel
      {
          public int idRelacionamento { get; set; }
          public string nomeTipoRight { get; set; }
          public string nomeTipoLeft { get; set; }
      }
  
      public class RelacionamentoListModel
      {
          public List&lt;RelacionamentoNomeadoModel&gt; lista { get; set; }
      }
  </code></pre>
  
  <p>Now I build the model and populate the RelacionamentoNomeadoModel  class to later add it to the class containing the List
  <strong>Controller</strong></p>
  
  <pre><code>var relacionamentoObj = from r in context.sistema_relacionamento
                                          join d in context.sistema_DocType on r.idTipoLeft equals d.id
                                          select new tgpwebged.Models.SettingsModels.RelacionamentoNomeadoModel
                                          {
                                             idRelacionamento = r.id,
                                             nomeTipoLeft = d.tipoName,
                                             nomeTipoRight = d.tipoName
                                          };
  
                  return PartialView(relacionamentoObj.ToList());
  </code></pre>
  
  <p>And the last I am trying to acces rela.lista.idRelacionamento  or any other property.
  I am able to access them from the controller bu not after I pass to the view
  <strong>View</strong></p>
  
  <pre><code>   @{
      List&lt;tgpwebged.Models.SettingsModels.RelacionamentoListModel&gt; relacionamentos = Model;
  
      foreach(var rela in relacionamentos) {
      rela.lista.
  }
  </code></pre>
  
  <p>}</p>