Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/wcf/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/entity-framework/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wcf RestSharp在实体框架中抛出错误_Wcf_Entity Framework_C# 4.0_Wcf Rest_Restsharp - Fatal编程技术网

Wcf RestSharp在实体框架中抛出错误

Wcf RestSharp在实体框架中抛出错误,wcf,entity-framework,c#-4.0,wcf-rest,restsharp,Wcf,Entity Framework,C# 4.0,Wcf Rest,Restsharp,字符串URL=”https://sampleservicebus.servicebus.windows.net/WinPhoneService/" 事实上,当我调试服务代码时,我能够看到KPIDomainData的所有值都以null的形式发送到方法中..尽管我正在发送值。请帮助我了解为什么KPIDomainData的属性以null的形式发送到服务中,甚至im传递值 RestClient client = new RestClient(URL); RestRequest request

字符串URL=”https://sampleservicebus.servicebus.windows.net/WinPhoneService/"


事实上,当我调试服务代码时,我能够看到KPIDomainData的所有值都以null的形式发送到方法中..尽管我正在发送值。请帮助我了解为什么KPIDomainData的属性以null的形式发送到服务中,甚至im传递值
RestClient client = new RestClient(URL);
     RestRequest request = new RestRequest("getkpimeasuredata", Method.POST);
               KpiDomainData kpidata = new KpiDomainData();
               kpidata.KPIId = 1006;
               kpidata.ScorecardId = 3;
               kpidata.EngineeringOrgId = 11;
               kpidata.DataValuetypeId = 1;
               kpidata.CumulativeMonth = 463;
               kpidata.BusinessOrgId = 1;

               string json = Newtonsoft.Json.JsonConvert.SerializeObject(kpidata);


               json = "{\"kpidata\" : " + json + "}";

               request.AddParameter("application/json; charset=utf-8", json, ParameterType.RequestBody);
               request.RequestFormat = DataFormat.Json;

               ObservableCollection<KpiMeasureData> kpiDetailsList = await client.ExecuteTaskAsync<ObservableCollection<KpiMeasureData>>(request);


               client.ExecuteAsync(request, response =>
               {
                   if (response.StatusCode == HttpStatusCode.OK)
                   {



                   }

               });
   {"ErrorCode":"1001","ErrorMessage":"System.Data.EntityCommandExecutionException: The data reader is incompatible with the specified 'ScaasModel.GetKPIMeasureData_Result'. A member of the type, 'ParamName', does not have a corresponding column in the data reader with the same name.\u000d\u000a   at System.Data.Query.InternalTrees.ColumnMapFactory.GetColumnMapsForType(DbDataReader storeDataReader, EdmType edmType, Dictionary`2 renameList)\u000d\u000a   at System.Data.Query.InternalTrees.ColumnMapFactory.CreateColumnMapFromReaderAndType(DbDataReader storeDataReader, EdmType edmType, EntitySet entitySet, Dictionary`2 renameList)\u000d\u000a   at