用于Windows Phone应用程序的Silverlight,用于连接SQL Server 2008 [英] Silverlight for Windows phone application to connect with SQL Server 2008

查看:97
本文介绍了用于Windows Phone应用程序的Silverlight,用于连接SQL Server 2008的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是初学者,我需要帮助。

Hi, I'm a beginner developer please I need help

我想为将要连接的Windows手机应用程序制作一个Silverlight存储在我的服务器中的数据库

我希望我的计算机只是用于测试的服务器..

I want to make a Silverlight for Windows phone application that will connect to my Database stored in my Server
and i want my Computer to be a Server just for testing..

我想要有人给我一些关于如何做这件事的信息吗?

如何让我的计算机服务器,每个拥有该应用程序的用户都可以连接到我的计算机数据库并检索一些信息

I want somebody to give me some information about how to do that thing?
How to make my computer server that every user who has that application can connect to my computer's database and retrieve some information

使用这些工具:

Visual Studio 2010 Professional

C#语言

Silverlight for Windows Phone

SQL Server 2008 Express

By using these tools:
Visual Studio 2010 Professional
C# Language
Silverlight for Windows Phone
SQL Server 2008 Express

推荐答案

最简单的方法是创建一个使用Entity Framework访问SQL Server数据库的OData服务,然后使用Windows Phone的OData客户端库来使用这个OData服务(在WP7.1 SDK)。

The easiest way to do this is to create an OData service that uses Entity Framework to access your SQL Server database, and then consume this OData service by using the OData client library for Windows Phone (in the WP7.1 SDK).

以下是服务和应用程序快速入门的链接:

Here are links for quickstarts for both the service and an app:


  1. 定义OData服务 - 在这种情况下基于Northwind。
  2. < a href ="http://create.msdn.com/en-US/education/quickstarts/ODataService">在Windows Phone 7中使用OData源 - 这实际上是使用Netflix服务,但它更完整使用MVVM的示例。



    如何:为Windows Phone使用OData服务 - 这会消耗Northwind,但实际上并不是WP编码技术的一个很好的例子
  1. Define an OData service--in this case based on Northwind.
  2. Consume OData feeds in Windows Phone 7--this actually uses the Netflix service, but it's a more complete example that uses MVVM.
    or
    How to: Consume an OData Service for Windows Phone--this consume Northwind, but is not really a great example of WP coding techniques

您还可以阅读有关OData和WP7的更多信息
in my博客文章

You can also read more about OData and WP7 in my blog posts.

干杯!

Glenn Gailey

Glenn Gailey


这篇关于用于Windows Phone应用程序的Silverlight,用于连接SQL Server 2008的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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