when using @foreach in MVC 4 I get the error:Object reference not set to an instance of an object. I have called a list in outer loop and now am trying to call a list in inner loop.
@foreach (var item in Model.Users)
{
@:<tr>
<td>@item.Title</td>
<td>@item.Name</td>
<td>@item.Age</td>
foreach (var user in Model.Company)
{
<td>@user.CompanyName</td>
}
@:</tr>
}