简体   繁体   中英

Windows Phone 8.1 Sql connection

Im developping windows phone 8.1 app with c#.

The question is how to connect windows azure sql server and get data from sql server?

In internet everywebsite say linqtosql. But in Windows Phone 8.1, there is no LinqtoSql classes.

I try entity framework search on internet but all website use again linqtosql datacontext.

Can anybody help me?

Windows phone 8.1 app is a client application that run on mobile. It cannot directly accesses windows azure database from your windows phone 8.1 client. you need to create some wcf service or web api on azure(or some other server) to get the data from azure sql. and in that service method or web api you can use LinqToSql to get data from Azure SQL. Below is the link on how you can create rest full web api on azure and add/retrive data form zaure sql

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.

Getting started with Mobile Services

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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