Я использую WCF Rest Service, у которого есть один метод, который принимает класс List в качестве параметра
, и когда я передаю список в формате json методу, он дает 0 счетчиков при цикле
ниже приведен мой код JSON
var profile = {"ARLog": [{"UserId": "98EE86A0-E673-4B7B-85EA-00620135E3F4", "RequestTime": "/ Date (628318530718) /", "SectionName": "Pts"}]} var inputdata = JSON.stringify (profile);
НИЖЕ МОЙ КОД C #
[OperationContract]
[WebInvoke(Method = "POST", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.WrappedResponse, UriTemplate = "UpdateArResponse")]
//[WebInvoke(Method = "POST", UriTemplate = "GetArResponse")]
DateTime UpdateARLog(List<ARLog> parameters);
public DateTime UpdateARLog(List<ARLog> parameters) // Here the parameter count is 0
{
return DateTime.Today;
}