В нашей архитектуре ASP.NET MVC мы имеем следующую структуру маршрутизации:несколько контроллеров, указанных в одном маршруте
http://localhost:80/Students/Details/2 - will give me details about student with id == 2, details include all the classes current student have.
http://localhost:80/Classes/Details/2 - will give me details about classes with id == 2, details include all the students current class have.
http://localhost:80/Schedule/Details/class=2&student=2 - will give me details about specific schedule for student with id=2 that has class with id=2
Это прекрасно работает до сих пор.
Теперь наша команда довольно новичок в asp.net mvc, и мы думали о том, чтобы сделать маршрутизацию более интуитивно понятной. Так что вместо трех отдельных маршрута мы будем иметь один длинный маршрут, что-то вроде этого:
http://localhost:80/Students/2/Classes/2/Homework/
и он будет работать как:
http://localhost:80/Students/ - will give list of students
http://localhost:80/Students/2 - will give details about student 2
http://localhost:80/Students/2/Classes - will give all the classes for student with id 2
http://localhost:80/Students/2/Classes/2 - will give schedule for class with id 2 and student with id 2.
Не бросить курить уверен, что это разумно/возможно, просто хотел получить больше отзывов
спасибо, что дало мне представление о том, куда идти! – inside
отлично, рад помочь! – zed