wcf - RestSharp throws error in Entity Framework -
string url="https://sampleservicebus.servicebus.windows.net/winphoneservice/"
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) { } });
in above call in response im getting response.statuscode expectationfailed , response.content follows
actually wcf service uses ef actual calls sp has dynamicsql return resultset..is bcos of dynamic sql in sp.i have created functionimports , complextype.and restcall works when use webclient instead of restclient.but need use restclient only...please help...
{"errorcode":"1001","errormessage":"system.data.entitycommandexecutionexception: data reader incompatible specified 'scaasmodel.getkpimeasuredata_result'. member of type, 'paramname', not have corresponding column in data reader same name.\u000d\u000a @ system.data.query.internaltrees.columnmapfactory.getcolumnmapsfortype(dbdatareader storedatareader, edmtype edmtype, dictionary`2 renamelist)\u000d\u000a @ system.data.query.internaltrees.columnmapfactory.createcolumnmapfromreaderandtype(dbdatareader storedatareader, edmtype edmtype, entityset entityset, dictionary`2 renamelist)\u000d\u000a @
Comments
Post a Comment