asp.net - WebApi routing not passing value -


i trying pass value controller / action in web api it's not finding it.

my route mapping:

        config.routes.maphttproute(             name: "defaultapi",             routetemplate: "api/{controller}/{action}/{id}",             defaults: new { id = routeparameter.optional }         ); 

my apicontroller:

    [httpget]     public string mything()     {         return "thing";     }      [httpget]     public string mystuff(int myid)     {         return "something " + myid;     } 

my rest call via restsharp:

var request = new restrequest { resource = "api/values/mystuff/555", method = method.get }; 

if call mything() works though. seems problem in passing id value.

modify parameter name "myid" "id"

[httpget] public string mystuff(int **id**) 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -