Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Windows Phone 7 Silverlight Cookbook

You're reading from   Windows Phone 7 Silverlight Cookbook All the recipes you need to start creating apps and making money.

Arrow left icon
Product type Paperback
Published in Aug 2011
Publisher Packt
ISBN-13 9781849691161
Length 304 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Jonathan Marbutt Jonathan Marbutt
Author Profile Icon Jonathan Marbutt
Jonathan Marbutt
Robb Schiefer Robb Schiefer
Author Profile Icon Robb Schiefer
Robb Schiefer
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Creating a WCF service to access a SQL database


In the business world, you will find the need to get data from custom databases, specifically SQL databases in many applications. This example will walk you through getting data from a SQL Server database and displaying it on your Windows Phone application. We will take a break from the Windows Phone in the first part of this example to build the underlying Windows Communication Foundation Service to communicate to the SQL database.

Getting ready

To start this example, we will open Visual Studio and create an ASP.NET Web Application named WCFServer:

This will provide us with the server-side piece to access the data:

  1. 1. The next step is to add a SQL Database that we will use to populate the data. We do this by right-clicking the App_Data folder and selecting to add a new SQL Database under the Data section:

  2. 2. Now that we have a database, we will want to create a table in it. To do this, double-click the database file in your Solution Explorer. This...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image