I want to pass multiple parameters in my Get Request using OData Protocol. Below is what I am doing.
I am using fiddler for GET request which is as follows
https://127.0.0.1/odata/controllerName('param1','param2')
In my controller class, I have two controller methods. First controller methods accepts only one parameter and second accepts two parameters. Controller method with one parameter works fine.When I am requesting controller method with two parameters, It invokes controller method with one parameter. I am not able to understand why it does not recognize controller method with two parameters. Or OData does not support multiple parameters.
Controller method 1
public int controllerName([FromOdataUri] string key);
Controller Method 2
public int controllerName([FromODataUri] string param1, [FromODataUri] string param2);