I have a a view model that looks like.
public class StoreItemViewModel
{
public Guid ItemId { get; set; }
public List StoreIds { get; set; }
I managed to get this working. I don't think its the correct way but it works.
public static IRestResponse Create(object objectToUpdate, string apiEndPoint) where T : new()
{
var client = new RestClient(CreateBaseUrl(null))
{
Authenticator = new HttpBasicAuthenticator("user", "Password1")
};
var json = JsonConvert.SerializeObject(objectToUpdate);
var request = new RestRequest(apiEndPoint, Method.POST);
request.AddParameter("text/json", json, ParameterType.RequestBody);
var response = client.Execute(request);
return response;
}