如何从异步 RIA 服务调用获取通知?
我已经使用 RIA Services、Entity Framework 4 和 Silverlight 4 设置了一个应用程序。它是按照 MSDN 上规定的方式设置的:演练:创建 RIA 服务解决方案
在客户端,此代码将客户实体加载到网格的 ItemsSource 中
public MainPage()
{
InitializeComponent();
LoadOperation<Customer> loadOp = this._customerContext.Load(this._customerContext.GetCustomersQuery());
CustomerGrid.ItemsSource = loadOp.Entities;
}
:对“loadOp.Entities”的调用是异步完成的(由 RIA 服务自动完成)。异步调用完成后如何收到通知?
I've got an application set up with RIA Services, Entity Framework 4, and Silverlight 4. It is set up in the fashion prescribed on MSDN here: Walkthrough: Creating a RIA Services Solution
On the client side, this code loads the customer entities into a grid's ItemsSource:
public MainPage()
{
InitializeComponent();
LoadOperation<Customer> loadOp = this._customerContext.Load(this._customerContext.GetCustomersQuery());
CustomerGrid.ItemsSource = loadOp.Entities;
}
The call to "loadOp.Entities" is done asynchronously (automatically by RIA Services). How do I get notification when the asynchronous call is complete?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要使用回调。我还没有使用过RIA的正式版本,但是在测试版中它是这样使用的。
You need to use a callback. I haven't used the official release of RIA yet, but in the beta it was used like so.