Universal store app getting data from server

牧云@^-^@ 提交于 2019-12-12 10:05:35

问题


I want to build an app that gets data from a server and it displays it in xaml. I'm new to universal programs and in windows store apps in general. I haven't found anything useful yet as ms sql solutions require libraries that is not allowed for universal store apps :(
P.S.: The answer in how to connect sql server 2008 R2 with windows store application did not answer my question, but Jeffery's answer did.


回答1:


You can’t connect to a MS SQL Server directly from the Windows App. The common way is host a data service and the app query the data through the REST API.

App -> data service (e.g. OData service) -> database (e.g. MS SQL Server)

In this case, you can deploy the SQL Server Data Service on IIS.

How to: Deploying OData Services using IIS & SQL Server

Then you use the HttpClient to retrieve the data from service.

Similar Question: Windows phone 8.1 app connect with a database



来源:https://stackoverflow.com/questions/32063814/universal-store-app-getting-data-from-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!