Null Reference Exception
I have been working on the tutorial for this book called Mvc Music Store. I have reached part ten and I have reached an error at the very end of it. The error reads "NullReferenceException: Object reference not set to an instance of an object."
The page that this exception is on reads the following:
"@model List<MvcMusicStore.Models.Album>
@{
ViewBag.Title = "ASP.NET MVC Music Store";
}
<div id="promotion">
</div>
<h3><em>Fresh</em> off the grill</h3>
<ul id="album-list">
@foreach (var album in Model)
{
<li><a href="@Url.Action("Details", "Store",
new { id = album.AlbumId })">
<img alt="@album.Title" src="@album.AlbumArtUrl" />
<span>@album.Title</span>
</a>
</li>
}
</ul>"
Does anybody have any ideas on how to get rid of this exception?
|