简体   繁体   English

Windows Phone 8.1 Sql连接

[英]Windows Phone 8.1 Sql connection

Im developping windows phone 8.1 app with c#. 我用C#开发Windows Phone 8.1应用程序。

The question is how to connect windows azure sql server and get data from sql server? 问题是如何连接Windows Azure SQL服务器并从SQL Server获取数据?

In internet everywebsite say linqtosql. 在互联网上,每个网站都说linqtosql。 But in Windows Phone 8.1, there is no LinqtoSql classes. 但是在Windows Phone 8.1中,没有LinqtoSql类。

I try entity framework search on internet but all website use again linqtosql datacontext. 我尝试在Internet上进行实体框架搜索,但所有网站都再次使用linqtosql datacontext。

Can anybody help me? 有谁能够帮助我?

Windows phone 8.1 app is a client application that run on mobile. Windows Phone 8.1应用程序是在移动设备上运行的客户端应用程序。 It cannot directly accesses windows azure database from your windows phone 8.1 client. 它不能直接从Windows Phone 8.1客户端访问Windows Azure数据库。 you need to create some wcf service or web api on azure(or some other server) to get the data from azure sql. 您需要在azure(或其他服务器)上创建一些wcf服务或Web api,以从azure sql获取数据。 and in that service method or web api you can use LinqToSql to get data from Azure SQL. 在该服务方法或Web API中,您可以使用LinqToSql从Azure SQL获取数据。 Below is the link on how you can create rest full web api on azure and add/retrive data form zaure sql 以下是有关如何在Azure上创建Rest Full Web API以及如何从zaure sql添加/检索数据的链接。

http://azure.microsoft.com/en-us/documentation/articles/web-sites-dotnet-rest-service-aspnet-api-sql-database/ http://azure.microsoft.com/en-us/documentation/articles/web-sites-dotnet-rest-service-aspnet-api-sql-database/

Hope this helps. 希望这可以帮助。

The quickest way is to use Mobile Services. 最快的方法是使用移动服务。 There are some pretty good tutorials where you can use .Net or Javascript on the service side. 有一些不错的教程,您可以在服务端使用.Net或Javascript。

Getting started with Mobile Services 移动服务入门

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM