asp.net web api - webapi route with controller and action -


default webapi route - api/{controller}/{id}

in realtime scenrios may require more , post methods

is recommended change default routing - api/{controller}/{action}/{id}

usually default values recommended values. don't need change unless have special requirements.

api/{controller}/{controller}/{id} non-sense because don't have display 2 times name of controller in url.

{action} not everytime needed (if use of get/put...). may want create api/{controller}/{action}/{id} second route or specify {action} in default route urlparameter.optional.


Comments

Popular posts from this blog

matlab - Deleting rows with specific rules -

jquery - How would i go about shortening this code? And to cancel the previous click on click of new section? -