I am calling a web api method.
API method:
//get
public bool GetShoppingElementDetails(ElementSearchParameter elementSearchParameter)
{
}
class ElementSearchParameter{
public string name;
public list<int> ids;
}
Actually that method is a get method, So how can i pass multidimention array parameter to that function,
I thinking like, the jquery framework is converting the complete object into correct querystring using "traditional=true", so that the mvc controller parsing that perfectly.
The same way in c# i want to do. Something like below,
ElementSearchParameter toSearch = new ElementSearchParameter{};
//convert the tosearch object into string object (parsing like jquery)
string toSearchString = ...
HttpResponseMessage response = httpManager.Client.GetAsync(string.Format(_routePrefixMeta + "/OrderOffering/Elements/search/{1}", programID, toSearchString)).Result;
return httpManager.ConstructData<List<OfferElementType>>(response);