我正在为我的学位编写一个项目,但我一直在使用 Silverlight 和 SQL,一旦我通过它执行了一个简单的查询,我就可以轻松地编写程序的其余部分。我真的很想要简单的答案。我尝试过 WCF RIA、域服务。
我无法让任何东西发挥作用。我使用 Silverlight 和 SQL Express 2008 创建了一个 ADO.NET 实体模型。我创建了一个域服务并选择了所需的表。但我无法让它发挥作用。
任何人都可以提供简单的基本说明,如果可能的话,提供代码如何从服务器端的数据库中提取数据并允许其显示在客户端 silverlight 应用程序上。我只需要能够使用数据创建登录/预订系统。
提前致谢。
I'm coding a project for my degree and I'm stuck on Silverlight and SQL, once I get a simple query executed through this I can then work on coding the rest of my program with ease. I would really like simple answers. I have played around with WCF RIA, domain services.
I can not get anything to work. I have created an ADO.NET Entity model with Silverlight and SQL Express 2008. I have created a domain Service and selected my required table. Yet I can not get it to work.
Can anyone provide simple basic instructions and if possible with code how to pull data from a database on the server side and allow it to be presented on the client silverlight application. I just need the ability to use data for creating a login/booking system.
Thanks in advance.
发布评论
评论(2)
http://www.silverlight.net/学习/教程/silverlight-4/using-wcf-ria-services/#Exercise2
http://blogs.microsoft.co.il/blogs/helpercoil/archive/2010/09/19/introduction-to-silverlight-and-wcf-ria-tutorial-part-3-domain- data-source.aspx
http://www.silverlight.net/getstarted/riaservices/
http://johnpapa.net/silverlight/wcf-ria-services-hands-on-lab/
http://www.silverlight.net/learn/tutorials/silverlight-4/using-wcf-ria-services/#Exercise2
http://blogs.microsoft.co.il/blogs/helpercoil/archive/2010/09/19/introduction-to-silverlight-and-wcf-ria-tutorial-part-3-domain-data-source.aspx
http://www.silverlight.net/getstarted/riaservices/
http://johnpapa.net/silverlight/wcf-ria-services-hands-on-lab/
我没有使用过WCF RIA。我只使用通过 ASP.NET 网站运行的常规 WCF 服务。我的 Silverlight 应用程序调用此服务上的常规方法,然后这些方法使用 ADO.NET 与服务器端的 SQL 进行交互。如果您刚刚开始使用 WCF RIA 可能会使事情变得复杂。
我编写的 Web 服务方法公开了根据我的数据库记录创建的 POCO 集合。将服务引用添加到我的 Silverlight 应用程序,然后生成这些数据类型的客户端版本,以供我的 UI 组件使用。
I haven't used WCF RIA. I just use a regular WCF service running via an ASP.NET website. My Silverlight application calls regular methods on this service and those methods then use ADO.NET to interact with the SQL on the server-side. Using WCF RIA may complicate things if you're just starting out.
The web service methods I have written expose collections of POCOs that are created from my database records. Adding the service reference to my Silverlight application then generates the client-side versions of these data types, ready for consumption by my UI components.