使用ADO.Net数据服务操作 [英] Consume ADO.Net Data Services Operation
问题描述
我在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屋!