daveharney (15) [Avatar] Offline
#1
Very good explanation of "Routing" - I definitely learned aspects of routing that I hadn't read elsewhere. Couple of comments:

Page 127 - how did View become DetailedView?

Page 131 - confusing - I assume a misprint or I didn't get the concept - why did USD remain constant?:

{controller}/{currency=USD}/{action=view}
I have actually added two default values here, so we could map any of the following URLs:
• /rates – controller=rates, action=view, currency=USD
• /rates/GBP – controller=rates, action=view, currency=USD
• /rates/USD/edit – controller=rates, action=view, currency=USD
• /currencies – controller=currencies, action=view, currency=USD
Andrew Lock (48) [Avatar] Offline
#2
Hi Dave,

Thanks for your comments as always.

daveharney wrote:
Page 127 - how did View become DetailedView?


This was a bit of a poor example, as it required a) default values that I hadn't covered at that point, and b) I didn't show you the complete route template at that point.

I will fix this example in an update to the MEAP, but for completeness, this is the routes I had in mind. Note that the final route has a default value of DetailedView, which is where that action comes from

routes.MapRoute(
  name: "photos",
  template: "Photos/{action}/{id?}"
  default: new { controller = "photos" });

routes.MapRoute(
  name: "default",
  template: "{controller}/{action}/{id?}");

routes.MapRoute(
  name: "detailed_view",
  template: "Person/View/{name}"
  default: new { controller = "person", action ="DetailedView" });



daveharney wrote:
Page 131 - confusing - I assume a misprint or I didn't get the concept - why did USD remain constant?:

{controller}/{currency=USD}/{action=view}

I have actually added two default values here, so we could map any of the following URLs:

• /rates – controller=rates, action=view, currency=USD
• /rates/GBP – controller=rates, action=view, currency=USD
• /rates/USD/edit – controller=rates, action=view, currency=USD
• /currencies – controller=currencies, action=view, currency=USD


You are completely correct, that was a typo, it should have been GBP in the second example (and the third actually!):

{controller}/{currency=USD}/{action=view}

• /rates – controller=rates, action=view, currency=USD
• /rates/GBP – controller=rates, action=view, currency=GBP
• /rates/USD/edit – controller=rates, action=edit, currency=USD
• /currencies – controller=currencies, action=view, currency=USD

Thanks again
Andrew
richard_photo (3) [Avatar] Offline
#3
The book the actual Papers Run after particulars exactly how college students can get through in laws university. This is often a main battle for a lot of college students plus they discovered a few achievement learning with each other. A number of the people in the research team identified an area exactly where all of the teachers stored report of the course information in the various courses they’d trained. A persons problem is the actual honest problem of selecting involving the correct as well as incorrect of the motion. This particular especially is definitely an fascinating event since it characteristics the most popular typecast associated with attorneys and just how they’re said to be proficient at lying down and therefore are dishonest generally (for more information click here). Equally Hart as well as Ford needed to set up a theft to recuperate Teacher Kingfield’s information. This really is throughout the winter season which is whenever Hart’s dependence on their teacher will become plainly apparent. Whenever Hart very first discovered the actual Value Space he previously an pressing need to obtain a take a look at their professor’s internal ideas. So Hart as well as Ford planed the ideal time for you to burglary which emerged once the assistant got your bathroom burglary the center of the night time.