Updating net compact framework dating an italian girl

When we run the project again and visit the "/Store" URL, we'll now see a list of all Genres in our database: With the /Store/Browse?

genre= action method, we're searching for a Genre by name.

With the explanations out of the way, here's how our updated Browse controller action looks: We can now update the Store Browse View to display the albums which are available in each Genre.

Open the view template (found in /Views/Store/Browse.cshtml) and add a bulleted list of Albums as shown below.

Our Albums will be associated with Artists, so we'll add a simple model class to describe an Artist.We'll start by declaring a field on the Store Controller to hold an instance of the Music Store Entities class, named store DB: The Music Store Entities class is maintained by the Entity Framework and exposes a collection property for each table in our database.Let's update our Store Controller's Index action to retrieve all Genres in our database. Now we can instead just use the Entity Framework context Generes collection: No changes need to happen to our View template since we're still returning the same Store Index View Model we returned before - we're just returning live data from our database now.Include("Albums") to indicate that we want related albums as well.This is more efficient, since it will retrieve both our Genre and Album data in a single database request.

Leave a Reply