无法从 RIA 服务获取数据
我正在尝试 SL4 和 RIA 服务。我遵循了使用 SL4 Business 模板提供的常见教程,但我不知道为什么当我运行该应用程序时,我不会从该服务获得任何结果。
我添加了一个 ADO.NET 模型,该模型连接到 Northwind 数据库,其中只有员工表,并且还创建了其域服务。
<sdk:DataGrid AutoGenerateColumns="False" Name="dataGrid1" MinHeight="100" ItemsSource="{Binding ElementName=employeeDomainDataSource, Path=Data}" />
<riaControls:DomainDataSource AutoLoad="True" d:DesignData="{d:DesignInstance my1:Employee, CreateList=true}" Height="0" LoadedData="employeeDomainDataSource_LoadedData" Name="employeeDomainDataSource" QueryName="GetEmployeesQuery" Width="0">
<riaControls:DomainDataSource.DomainContext>
<my:NorthwindContext />
</riaControls:DomainDataSource.DomainContext>
</riaControls:DomainDataSource>
I'm trying the SL4 and RIA Services out. I followed the common tutorials available using SL4 Business template but I don't know why when I run the app I won't get any results from the service.
I have added a ADO.NET model which is connected to Northwind database and has only Employees table in it and also created its domain service.
<sdk:DataGrid AutoGenerateColumns="False" Name="dataGrid1" MinHeight="100" ItemsSource="{Binding ElementName=employeeDomainDataSource, Path=Data}" />
<riaControls:DomainDataSource AutoLoad="True" d:DesignData="{d:DesignInstance my1:Employee, CreateList=true}" Height="0" LoadedData="employeeDomainDataSource_LoadedData" Name="employeeDomainDataSource" QueryName="GetEmployeesQuery" Width="0">
<riaControls:DomainDataSource.DomainContext>
<my:NorthwindContext />
</riaControls:DomainDataSource.DomainContext>
</riaControls:DomainDataSource>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的。我的错!我尚未将 AutoGenerateColumns 属性设置为 true
Ok. My fault! I have not set the AutoGenerateColumns property to true