Part Two MVC labs Adding A Controller - matthewmorris41/MCVMovie2 GitHub Wiki

Part Two MVC labs

  1. Explain the Default route in am MVC application (controller, action, id). Give an example controller name, action name and a parameter?

the controller is named "HelloWorld Controller and the first method is named index. action names was ActionResult (the controller is the method, a method is a function in a class) it seemed to me that there was zero parameters.

  1. What are the default Controller and Action? ASP.NET MVC invokes different controller classes & different action methods within them depending on the URL.

  2. What are two different ways to reach action methods with two or more parameters? Describe how you would use each pass in parameters as route data than passing them as query strings. You could also add a route to pass both the name and numtimes in parameters as route data in the URL.