是否可以在SilverLight 2应用程序中不使用WCF的情况下访问数据源 [英] Is it possible to access Datasource without using WCF in SilverLight 2 app

查看:53
本文介绍了是否可以在SilverLight 2应用程序中不使用WCF的情况下访问数据源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我打算学习Microsoft SilverLight.在此期间,我遇到一个问题,即不使用WCF服务就无法访问数据库,或者是否可以使用ADO.NET.
请举一个例子.还有另外一件事建议我快速学习Silverlight的任何好材料.

Hi,

i have planning to learn Microsoft SilverLight.During that time i got an question that without using WCF service cannot we access database or is it possible with ADO.NET.
Please reply with an example.And one more thing that suggest me any good material to learn silverlight quickly.

推荐答案

,我们不能打电话直接从Silverlight应用程序获取ADO.NET代码,因为Silverlight 不是 ADO.net 组成.但是Silverlight确实具有 WCF ,因此我们可以创建一个WCF服务来执行数据库操作,而Silverlight应用程序将对其进行调用.

阅读本文:

使用Silverlight中的WCF连接SQL Server的7个简单步骤 [
No,we cannot call ADO.NET code directly from a Silverlight application because Silverlight does not consist of ADO.net. But Silverlight does have WCF, hence we can create a WCF service which does database operations and Silverlight application will make calls to the same.

Read this article:

7 Simple Steps to Connect SQL Server using WCF from SilverLight[^]


hope it helps :)


不,您不能直接在Silverlight中访问数据库.

您可以通过WCF服务或WCF RIA服务来实现.

查看Silverlight示例 [
No you can''t access database in silverlight directly.

You can do it by WCF Services or WCF RIA Services.

Check out Silverlight Samples[^]

Regards,
Sagar Solanki


您不能在silverlight(sl)中使用任何ADO.NET类(实际上它们未包含在sl中),因为silverlight在用户的浏览器中,并且您的ADO.NET可以在您的服务器中...

silverlight应用程序是Rich Intenet应用程序(RIA),意味着它在浏览器内部具有丰富的用户交互工具集,无论发生什么事情都只能在浏览器中发生...或者它调用服务调用,例如ASP.NET Web服务,WCF服务, RIA服务..等...


是学习Silverlight/WPF的好地方...

经过它. :)

http://www.wpftutorial.net/ [ ^ ].

如果满意,请标记为答案..有关更多澄清,请在下面评论:)
You can not use any ADO.NET classes (infact they are not included in sl) inside silverlight (sl), because the silverlight is in user''s browser, and your ADO.NET can be in your server...

silverlight application is a Rich Intenet Application (RIA), means it has rich set of user interaction tools inside the browser, whatever happens can only happen in browser... or it call make call to services i.e. ASP.NET webservice, WCF services, RIA services.. etc...


its a good place to learn silverlight/wpf...

go through it. :)

http://www.wpftutorial.net/[^].

if satisfied mark as answer.. for more clarifications comment below :)


这篇关于是否可以在SilverLight 2应用程序中不使用WCF的情况下访问数据源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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