In Class Work Discussion


For week 1, day 2 we created an empty MVC Core project. You were suppose to use the static built model and output to the view. Several of your implementations were very close to outputting the model into the view. A hint for you, go to page 34 and look at the model binding example on the page. Also look at the the View() parameters that can be passed into the view method. This should help you solve the final issue.


I created a working example of Wk 1 Day 2 in class project.Try to complete on your own before looking at my solution.


Add a live database instance example, connecting to a gearhost SQL instance.


I understand most of it, but only after looking at your code. Can we go over the Controller code tomorrow? I’m also not sure why we need the code in the View:
@{ Layout = null;
string[] strArr = (string[]) ViewData[“my_arr”];


The ViewData is a separate example of passing data from the controller to the view.