I am currently posting to my web api like this:
client.PostAsJsonAsync("api/controller/methodincontroller", listOfProductObject);
I would like to know how in addition to the list of my Product object I can also send an additional string to the method in my controller without making it a property of my Product model.
If this isn't possible I will have to make a Model that has 2 properties for this purpose only:
IList<Product> productList
string additionalParam
api/controller?additionalParam=somethingand the other using from body attribute. asp.net/web-api/overview/formats-and-model-binding/…, so it would look like:client.PostAsJsonAsync("api/controller/methodincontroller?additionalParam=" + myParam, listOfProductObject);PostAsJsonAsync, but the idea is the same.