OK I found what I needed.
I tried the Alias attribute from ServiceStack.DataAnotations.Alias but this did nothing and I am not sure what it is for?
I then found that adding a reference to System.Runtime.Serialization was needed and also adorning the class with
[System.Runtime.Serialization.DataContract]
Now each public property needs the following attribute or it will not pass the parameter to the rest server. IN the case of the property called Public it specifies the name in the DataMember attribute constructor.
[System.Runtime.Serialization.DataMember]
Below is an example
[System.Runtime.Serialization.DataContract]
public class RequestVoiceBaseSearch : VoiceBaseBaseClass, IReturn<ResponseVoiceBaseSearch>
{
[System.Runtime.Serialization.DataMember]
public string action { get; set; }
[System.Runtime.Serialization.DataMember]
public string terms { get; set; }
[System.Runtime.Serialization.DataMember]
public string from { get; set; }
[System.Runtime.Serialization.DataMember]
public string to { get; set; }
[System.Runtime.Serialization.DataMember(Name = "Public")]
public bool _public { get; set; }
[System.Runtime.Serialization.DataMember]
public string rank { get; set; }
public RequestVoiceBaseSearch()
: base()
{
this.action = "Search";
this.terms = "";
}
}
Chris