我怎样才能连接到使用微软的Silverlight我的SQL Azure的数据库? [英] How can I connect to my SQL Azure-database using Microsoft Silverlight?

查看:161
本文介绍了我怎样才能连接到使用微软的Silverlight我的SQL Azure的数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows Azure中有一个数据库联机。我想连接到数据库并显示微软的Silverlight一些表。我创建了一个Silverlight应用程序,并在网站上公布Azure的这里

I have a database online at Windows Azure. I want to connect to the database and show some tables in Microsoft Silverlight. I have created a Silverlight Application and published the website on Azure here!

我如何连接在Silverlight我的SQL Azure数据库?

How do I connect to my SQL Azure database in Silverlight?

推荐答案

的相同的方式连接到任何其他数据库!
就个人而言,我使用的EntityFramework,并创建自己的服务。您可以使用EF和使用RIA Services来,虽然创造了不少code的你,如果你preFER。

The same way as connecting to any other database! Personally, I use EntityFramework and create my own service. You can use EF and use RIA Services to create a lot of code for you though if you prefer.

添加实体模型到您的项目,从现有的数据库,指向做你的Azure分贝,工作创造。请记住,你现有的IP添加到Azure的防火墙,同时发展。

Add an Entity Model to your project, create from existing db, point at your Azure Db, job done. Remember to add your existing IP to the Azure firewall while developing.

编辑:
试试下面这个教程,而不是:
http://msdn.microsoft.com/en-美国/库/ ee707376(v = vs.91)的.aspx
但有一点要注意。当你来到步骤添加的DomainService,如果它没有拿起你的背景,你需要按照以下列出的步骤:
http://support.microsoft.com/kb/2745294
......这很容易遵循。删除TT文件,并从没有改变模型code生成策略为默认值。

Try following this tutorial instead: http://msdn.microsoft.com/en-us/library/ee707376(v=vs.91).aspx BUT one thing to watch out for. When you come to the step to add a DomainService, if it hasn't picked up your context you will need to follow the steps listed here: http://support.microsoft.com/kb/2745294 ... which are easy to follow. Delete the TT files and change the model code generation strategy from none to default.

这篇关于我怎样才能连接到使用微软的Silverlight我的SQL Azure的数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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