My problem is that I want to send post request with serialized object to WCF method Here is my code.
[Serializable]
public class StandardCardModel
{
public string lang { get; set; }
public string app_source { get; set; }
public string card { get; set; }
}
[ServiceContract]
public interface IService1
{
[OperationContract]
[WebInvoke(Method = "POST",
RequestFormat = WebMessageFormat.Json,
ResponseFormat = WebMessageFormat.Json,
BodyStyle = WebMessageBodyStyle.Wrapped,
UriTemplate = "GetLastTransactions")]
LastTransactionsResult GetLastTransactions(StandardCardModel scm);
Now I want to call 'GetLastTransactions' with param :
{
"lang": "en",
"app_source": "TestSource",
"card": "1111"
}
To be clear, I don't want to send JSON with param name as object. ex :
{"scm":{....}}
I am getting null in scm. Any suggestions? Thanks