Skip to content

Instantly share code, notes, and snippets.

@vkoppaka
Created May 24, 2012 05:53
Show Gist options
  • Select an option

  • Save vkoppaka/2779710 to your computer and use it in GitHub Desktop.

Select an option

Save vkoppaka/2779710 to your computer and use it in GitHub Desktop.
public ActionResult Browse(string genre)
{
// Retrieve Genre and its Associated Albums from database
FetchStrategy fetchStrategy = new FetchStrategy();
fetchStrategy.LoadWith<Genre>(g => g.Albums);
storeDB.FetchStrategy = fetchStrategy;
Genre genreModel = storeDB.Genres.FirstOrDefault(g => g.Name == genre);
return View(genreModel);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment