title: Cant access ICollection data in view
body: <p>I stumbled upon an error when i try to access my ICollection content.
  Code as follows:
  View</p>
  
  <pre><code>foreach (var carInfo in Model)
  {
      @carInfo.Id
      @carInfo.Brand
      ......... ect.
  
      foreach (var rentInfo in carInfo.RentInfo)
      {
         @rentInfo.RentDate
         ....... ect.
      }
  }
  </code></pre>
  
  <p>View top:</p>
  
  <pre><code>@model IEnumerable&lt;TestApp.Models.Cars&gt;
  </code></pre>
  
  <p>Car Model:</p>
  
  <pre><code>public class Cars
  {
      public int Id { get; set; }
      public string CarPlateNumber { get; set;  }
      public string Brand { get; set; }
      public string Fullname { get; set; }
      public string Category { get; set; }
      public int ReleaseDate { get; set; }
      public int SeatCount { get; set; }
      public string GearBox { get; set; }
  
      public virtual ICollection&lt;CarRent&gt; RentInfo { get; set; }
  }
  </code></pre>
  
  <p>If i remove code:</p>
  
  <pre><code>foreach (var rentInfo in carInfo.RentInfo)
          {
             @rentInfo.RentDate
             ....... ect.
          }
  </code></pre>
  
  <p>Everything works fine, the question is why does this aprouch does not work?</p>