I'm building an APS.net MVC 2 app, where I have a parent table and a child table.
I've got the controller, view and model built for the parent table, so I can Add, Edit, View Details and dete records from the parent table.
I using the following routing to do this:
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Parent", action = "List", id = "" } // Parameter defaults
This setup lets me use the following urls in my app:
To list all parent records: /Parent/List
To view details for a specific parent record: /Parent/Details/< ID>
To Edit a specifc parent record: /Parent/Edit/< ID>
etc
Now I have a child table for each parent record. What is the standard routing for this?
To list app child records for a specific parent: Parent/< ID>/Child/List
To view details for a specific child record: Child/Details/< ID>
To edit a specific child record: Child/Edit/< ID>
Does that look right? And how would I go about setting up the MapRoute?