I'm trying to model class and sections of a class and further instances of sections.
so route should be Class/ (Create, Details, Index, Edit) for classes
Then I've a section controller
ClassSection
so I would do
Class/1/ClassSection/ (Create, ... ) since ClassSection without classid is useless
and then further
Class/1/ClassSection/1/Instance
to go to SectionInstance controller
how can I map my routes to conform to this notation
I've tried doing this for class sections
routes.MapRoute(
"ClassSections",
"Class/{classid}/ClassSection/{action}/{id}",
new { controller = "ClassSection" },
new { classid = @"d+" }
);
but I can't generate a proper link from Html.ActionLink in Index action of Class