Do I need a separate controller for the below?
http://localhost/bookmarks –> bookmarks controller http://localhost/bookmark/{bookmarkid} –> bookmark controller
Is there any way I can combine them both into one controller? I want to keep the uri’s the same i.e. bookmark singular indicating fetch a single bookmark.
Thanks
Assuming a C# development environment
Global.asax:
BookmarksController:
Using this routing scheme, http://localhost/bookmarks will hit the Bookmarks action in the Bookmarks controller, and http://localhost/bookmark/123456 will hit the Bookmark action in the Bookmarks controller.