Windows Scripting
  Home arrow Windows Scripting arrow Page 3 - Silverlight 2.0 Application Development wi...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
WINDOWS SCRIPTING

Silverlight 2.0 Application Development with LINQ to SQL and a WCF Service
By: Jagadish Chaterjee
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 6
    2008-11-12

    Table of Contents:
  • Silverlight 2.0 Application Development with LINQ to SQL and a WCF Service
  • Creating a Visual Studio 2008 solution to work with “LINQ to SQL”, WCF and Silverlight 2.0
  • WCF development
  • Silverlight development
  • Troubleshooting configurations
  • Troubleshooting configurations: continued

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Silverlight 2.0 Application Development with LINQ to SQL and a WCF Service - WCF development


    (Page 3 of 6 )

    This is a continuation from the previous section.

    • Open “DemoEmpService” project and rename “Service1.svc” and “IService1.vb” to “EmpService.svc” and “IEmpService.vb” respectively (together with all of their associations). The steps are clearly explained in my previous article.

    • Configure the virtual path (using Project properties) to point to the local IIS and add ClientAccessPolicy.xml to IIS root (ex: c:inetpubwwwroot). The file is included in the attached source code and the steps are well explained in my previous article.

    Open “IEmpService.vb” and modify the code so that it looks like the following:


    <ServiceContract()> _

    Public Interface IEmpService


    <OperationContract()> _

    Function GetEmployeeList() As List(Of Emp)


    End Interface


    Open “EmpService.svc” and modify the code as follows:


    Imports System.Data.Linq


    Public Class EmpService

    Implements IEmpService



    Public Sub New()

    End Sub


    Public Function GetEmployeeList() As System.Collections.Generic.List(Of Emp) Implements IEmpService.GetEmployeeList

    Using ctxt As New DemoEmpDataContext

    ctxt.ObjectTrackingEnabled = False

    Return ctxt.Emps.ToList

    End Using

    End Function


    End Class


    Build your solution and test “EmpService.svc” using “WCF Test client” (explained in my previous article). You can also test the service using a WinForm application with the following code (the Win Form project is included in the attached source code):


    Public Class Form1


    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

    Dim obj As New EmpService.EmpServiceClient

    Me.DataGridView1.DataSource = obj.GetEmployeeList

    End Sub

    End Class


    More Windows Scripting Articles
    More By Jagadish Chaterjee


       · Thanks for a great article! Nice explanation!One issue I had was after I added...
     

    WINDOWS SCRIPTING ARTICLES

    - More Windows Scripting Workarounds from Nilpo
    - Overloading Methods and More in VBScript
    - Improving MFC for Windows Vista
    - Regular Expressions in VBScript
    - Working with Dates in WMI
    - Completing Calendars with VBScript Date Func...
    - Building Calendars with VBScript Date Functi...
    - Working With Dates and Times in VBScript
    - Designing WCF DataContract Classes Using the...
    - Understanding Dates and Times in VBScript
    - Working With Arrays in VBScript
    - Compressed Folders in WSH
    - Using .NET Interops in VBScript
    - Nilpo`s Scripting Secrets, Vol I
    - Database operations using Silverlight 2.0 WC...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek