Now that we have looked at how to pass data around in your view using the
ViewData dictionary, we can take a look at how to pass data around without the
ViewData dictionary. Specifically, we want to take a look at how to do this using a strongly typed view.
This recipe will use the
Product class that we created in the last recipe. It will also use NBuilder to generate
Product data in the same way that we did earlier. You can copy the last project over for this recipe and build from where you left off in the last recipe (or start a new project and grab what you need from the previous recipe as we go).
Views/Homefolder and then open the