使用Silverlight客户端使用ADO.NET数据服务 [英] Consuming of ADO.NET Data Service with Silverlight client

查看:89
本文介绍了使用Silverlight客户端使用ADO.NET数据服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有数据服务(使用ado.net而不是WCF ),它具有执行存储过程的功能(没有参数摄入,当我执行函数导入时它与任何表没有关联)但返回类型是字符串。

 

当我访问该函数时,我能够看到数据内容:

http:// localhost:Portnum /Webdataservice.svc/GetData

 

现在我面临的问题如下:

我必须存储返回结果的内容变成了字符串变量。我尝试了很多东西,但都是徒劳的。所以如果你知道的话请建议。

 



请使用相同的指南,我尝试了几乎所有可用的方法。

 

谢谢,

Madhav Joshi

I have data service(using ado.net not WCF ) which has function which executes stored procedure(with no parameters intake and its not associated with any table when i do function import) but return type is string.
 
I am able to see content of data when i access the function :
http://localhost:Portnum/Webdataservice.svc/GetData
 
Now problem i am facing is as below:
I have to store the contents of returned result into string variable.I tried with many things but all in vain. So please do suggest if you know.
 

Please Guide with the same ,I have tried with almost all methods available.
 
Thanks,
Madhav Joshi

推荐答案

如果您的服务操作使用GET动词(它看起来像它)并且它返回一个字符串,您可以使用DataServiceContext.Execute< string>(新的Uri(" http) :// localhost:Portnum / Webdataservice.svc / GetData"))。first()得到结果。

If your service operation uses the GET verb (which it seems like it) and it returns a single string you can use the DataServiceContext.Execute<string>(new Uri("http://localhost:Portnum/Webdataservice.svc/GetData")).First() to get the result.

谢谢,


这篇关于使用Silverlight客户端使用ADO.NET数据服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆