Windows Scripting
  Home arrow Windows Scripting arrow Page 4 - Designing WCF DataContract Classes Using t...
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

Designing WCF DataContract Classes Using the LINQ to SQL Designer
By: Jagadish Chaterjee
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 3
    2009-01-14

    Table of Contents:
  • Designing WCF DataContract Classes Using the LINQ to SQL Designer
  • Creating WCF DataContract classes visually using LINQ to SQL Designer
  • Creating WCF DataContract classes visually using LINQ to SQL Designer: Accessing in Silverlight
  • Inheriting WCF DataContract classes visually using LINQ to SQL Designer
  • Inheriting WCF DataContract classes visually using the LINQ to SQL Designer: accessing

  • 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


    Designing WCF DataContract Classes Using the LINQ to SQL Designer - Inheriting WCF DataContract classes visually using LINQ to SQL Designer


    (Page 4 of 5 )

    In the previous sections, we have seen how to work with "DataContract" classes using the "LINQ to SQL Designer." In this section, I will extend the same with inheritance.

    We can also inherit existing DataContract classes and create new sub DataContract classes visually using the "LINQ to SQL Designer." Open the previously-created "EmpViews.dbml" and create a new class (EnameDnameSal) with inheritance as shown below:


    Once it is created, we should have a new class created in "EmpViews.Designer.vb" as follows:

    <DataContract()> _

    Partial Public Class EnameDnameSal

    Inherits EnameDname

     

    Private _Sal As Double

     

    Public Sub New()

    MyBase.New

    End Sub

     

    <Column(Storage:="_Sal"), _

    DataMember(Order:=1)> _

    Public Property Sal() As Double

    Get

    Return Me._Sal

    End Get

    Set

    If ((Me._Sal = value) _

    = false) Then

    Me._Sal = value

    End If

    End Set

    End Property

    End Class


    In the above class, you must observe the "inherits" statement in the class declaration. It is automatically added by the designer!

    More Windows Scripting Articles
    More By Jagadish Chaterjee


       · Hai,This is my next article in the series of WCF tutorials. Enjoy and let me...
     

    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 3 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek