Silverlight 2.0 Application Development with LINQ to SQL and a WCF Service
(Page 1 of 6 )
This is my third article in a series focusing on Silverlight 2.0 (RC 1) development using Visual Studio 2008. In this article, we will create a simple “LINQ to SQL” model, access the model with a WCF Service and consume the same using a Silverlight 2.0 application. Technically, we will have Silverlight 2.0 controls accessing a regular WCF Service and fetch information from the database using the “LINQ to SQL” model.
This article assumes that you have a minimum knowledge of technologies like “LINQ to SQL,” “WCF,” “Silverlight,” etc. If you don’t, and you need step-by-step walkthroughs for the above technologies, please go through the following links.
If you are new to Silverlight 2.0 development, please refer to the following articles that I have written before going ahead (available at http://www.aspfree.com/cp/bio/Jagadish-Chatarji/):
If you are new to LINQ to SQL, please refer to the following articles that I have written:
http://www.aspfree.com/c/a/.NET/Beginning-LINQ-to-SQL-Using-Visual-Studio-2008/
http://www.aspfree.com/c/a/.NET/Introducing-LINQ-to-SQL-Designer-using-Visual-Studio-2008/
If you want to learn more about WCF Service and WCF Service Library, consider reading the following WCF articles that I have written:
http://www.aspfree.com/c/a/ASP.NET/Developing-a-WCF-Service-Library-and-Hosting-it-as-WCF-Web-Service-Using-VS2K8/
http://www.aspfree.com/c/a/BrainDump/Developing-an-Object-Oriented-Business-Component-Using-WCF-and-Visual-Studio-2008/
For this article, I upgraded my development machine from “Silverlight 2.0 tools beta 2” to “Silverlight 2.0 tools RC 1.” My machine is now equipped with the following environment:
Windows Server 2003 with SP2
IIS
SQL Server 2008
Visual Studio 2008 (comes with .NET 3.5) with SP1
Microsoft Silverlight 2.0 Tools (RC 1) for Visual Studio 2008 (includes Silverlight, Silverlight SDK and Tools for VS 2008).
To make this article simple, I created a table structure as seen at http://cid-41050f68f010a662.skydrive.live.com/self.aspx/Public/images/DeptEmp.gif
The entire source code for this article is available in the form of a free downloadable zip file. The solution was developed using Microsoft Visual Studio 2008 Team Edition (with SP1) with Microsoft SQL Server 2008 Developer Edition on Microsoft Windows Server 2003 Standard Edition (with SP3) with Silverlight 2.0 RC 1. I didn’t really test it in any other environment. I request that you post in the discussion area if you have any problems in execution.
Next: Creating a Visual Studio 2008 solution to work with “LINQ to SQL”, WCF and Silverlight 2.0 >>
More Windows Scripting Articles
More By Jagadish Chaterjee