使用ADO.Net数据服务操作 [英] Consume ADO.Net Data Services Operation

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

问题描述

我在ado.net数据服务中有一个服务操作,它返回一个标量值(最后一个客户联系日期)。

我能够使用
http:// localhost:2751 / MyDataService.svc / GetLastContactDate ()

我正在寻找我如何使用vb.net在Silverlight客户端中使用此服务操作的示例

Execute方法是否允许我返回此值,以便我可以在另一个查询中使用它。
感谢您的帮助

解决方案

嗨Congero,您应该能够使用异步模式调用Execute方法从客户端调用服务操作以产生正确的结果。
BeginExecute 方法注册服务在操作完成时调用的委托。应该在注册处理该代理的委托中调用
EndExecute 方法完成操作的回调。


此外,请确保在没有任何parantheses的情况下调用服务操作。它应该像 -
http:// localhost:2751 / MyDataService.svc / GetLastContactDate


I have a services operation in an ado.net data service that returns a scalar value (last customer contact date).

I was able to test my operation in the browser by using  

http://localhost:2751/MyDataService.svc/GetLastContactDate()

I am looking for examples of how I can consume this service operation in my Silverlight client using vb.net

Will the Execute method allow me to return this value so I can use it in another query.
Thanks for any help

解决方案

Hi Congero, you should be able to call Execute method using the Async pattern to invoke the service operation from the client to yield the right result. The BeginExecute method registers a delegate that the service calls when the operation is completed. The EndExecute methods should be called in the delegate that is registered to handle the callback from the completed operations.

Also, make sure to call the service operation without any parantheses. It should be like - http://localhost:2751/MyDataService.svc/GetLastContactDate


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

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