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
Post a Comment