I managed to consult some people who are well versed in this sort of thing and I have figured it out. storeDB is an instance of the MvcMusicStoreDB database but it has to be declared as such. So, before
Code:
var albums = storeDB.Albums
insert
Code:
MvcMusicStoreDB storeDB = new MvcMusicStoreDB();
So you have this:
Code:
public ActionResult Search(string q)
{
MvcMusicStoreDB storeDB = new MvcMusicStoreDB();
var albums = storeDB.Albums
.Include("Artist")
.Where(a -> a.Title.Contains(q) || q == null)
.Take(10);
return View(albums);
}
I'm still confused as to where the nicely formatted website came from. Does anyone know?