我如何使用SQL在Windows Store应用进行交互 [英] How do I interact with SQL in a Windows Store App

查看:110
本文介绍了我如何使用SQL在Windows Store应用进行交互的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在问我们就该开始开发公司的LOB Web应用程序的Windows应用商店的版本。什么是去了解与出数据存储交互的最佳方式是什么?

I've been asked to begin developing a Windows Store version of our company's LOB web application. What's the best way to go about interacting with out data store?

我的第一个倾向是去的HTML / JavaScript的(JQuery的)航线,并使用Web服务来检索数据,但我想尝试使用C#/ XAML因为我自己熟悉使用XAML,这将是采取深入了解XAML的绝佳机会。

My first inclination is to go the HTML/JavaScript(JQuery) route and use a web service to retrieve the data, but I'd like to attempt to use C#/XAML as I'm familiarizing myself with XAML and this would be the perfect opportunity to take a deep dive into XAML.

时的Javascript出来的SQL服务器进行通信的唯一途径,或者我可以通过C#/ XAML实现这一目标?如果是这样任何人都可以点我在正确的方向或者提供如何连接点的WinRT中框架和SQL之间的一般例子?

Is Javascript the only way to communicate with out sql servers, or can I achieve this through C#/XAML? If so can anyone point me in the right direction or perhaps provide a general example of how to "connect the dots" between the WINRT framework and SQL?

推荐答案

您可以用C#或JavaScript完成它,你会做它几乎以同样的方式,通过服务。 Windows应用商店(C#/ VB)应用程序不具有相同的功能,桌面应用程序做通过像ODBC,JDBC,SQL本机客户端等接口来访问数据库,这样你就不会与SQL连接你赢RT的应用,您会通过本身直接访问数据库中的托管服务来连接它。

You can accomplish it with C# or JavaScript and you'd do it pretty much the same way, via services. Windows Store (C#/VB) applications don't have the same capabilities as desktop apps do to access databases via interfaces like ODBC, JDBC, SQL Native Client, etc., so you won't be connecting your Win RT app with SQL, you'll be connecting it via a hosted service that itself directly accesses the database.

根据您的LOB Web应用程序是如何分区,您可以将已有的功能服务层,然后通过HTTP请求调用从Windows商店应用这些服务。该 HttpClient的样品应该帮助,并根据你也可以使用该服务的实现 WCF客户端功能在Windows应用商店的应用

Depending on how your LOB web application is partitioned, you may be able to expose existing functionality as a service layer and then invoke those services from your Windows Store app via HTTP requests. The HttpClient sample should help and depending on the service implementation you can also use WCF client capabilities in Windows Store apps.

这篇关于我如何使用SQL在Windows Store应用进行交互的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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