直到下面就可以了。
http://msdn.microsoft.com/en-us/library/ee796239(v=vs.91).aspx#Y2918
从下面的链接看,_customer上下文来自何处?
http://msdn.microsoft.com/en-us/library/ee707338(v=vs.91).aspx
答案 0 :(得分:1)
以下是来自Walkthrough: Creating a RIA Services Solution的代码,其中定义了_customerContext。
Imports System.ServiceModel.DomainServices.Client
Imports RIAServicesExample.Web
Partial Public Class MainPage
Inherits UserControl
Private _customerContext As New CustomerDomainContext
Public Sub New()
InitializeComponent()
Dim loadOp = Me._customerContext.Load(Me._customerContext.GetCustomersQuery())
CustomerGrid.ItemsSource = loadOp.Entities
End Sub
End Class