是否可以在Windows Phone 7上使用MS Azure数据库? [英] Is it possible to use a MS Azure database on a Windows Phone 7?

查看:200
本文介绍了是否可以在Windows Phone 7上使用MS Azure数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在尝试从Windows Phone 7应用程序连接到MS Azure数据库.
假定该数据库也可以在我做过的网站上使用.
有可能吗?
谢谢!

Hi,

I am trying to connect from my Windows Phone 7 app to the MS Azure Database.
This database is suppose to also be used on a website that i have did.
Is it possible?
Thanks!

推荐答案

您可以(而且我愿意)将SQL Azure用作电话应用程序的后端.您将发现的问题是,SQL Azure上的设置是数据库希望与之联系的IP地址.您可能不想对所有人开放.

我要做的是在计算实例中制作一个小型WCF服务,并使用EF直接与数据库对话.这样,电话应用程序可以仅调用服务,然后该服务将调用数据库.这简化了很多事情,并且还允许您在网站或任何其他电话项目上使用相同的服务.我现在可以在iOS,Android,WP7和Windows 8上运行.

如果您需要更多信息,请告诉我,我之前曾在波士顿的一个代码集中营进行过演讲.
You can (and I do) use SQL Azure as a back end for my phone apps. The issue that you will find is that a setting on SQL Azure is the IP addresses that the database is expecting to get contact from. You probably won''t want to open that up for everyone.

What I have done is to make a small WCF service in a compute instance and used EF to talk to the database directly. This way the phone app can just call the service and the service calls into the database. This simplifies many things and also allows you to use that same service on a website or any other phone project as well. I have mine running on iOS, Android, WP7, and Windows 8 now.

Let me know if you want more information, I have given this as a talk in Boston at a code camp before.


这篇关于是否可以在Windows Phone 7上使用MS Azure数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆