BrainDump
  Home arrow BrainDump arrow Page 3 - Developing an Object Oriented Business Com...
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? 
BRAINDUMP

Developing an Object Oriented Business Component Using WCF and Visual Studio 2008
By: Jagadish Chaterjee
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 16
    2007-10-31

    Table of Contents:
  • Developing an Object Oriented Business Component Using WCF and Visual Studio 2008
  • Understanding the WCF Business Component
  • Understanding the WCF Business Component: Source Code for Entity classes
  • Understanding the WCF Business Component: Source Code for Business Logic
  • Understanding the WCF Business Component: Source Code for “DBHelper”

  • 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


    Developing an Object Oriented Business Component Using WCF and Visual Studio 2008 - Understanding the WCF Business Component: Source Code for Entity classes


    (Page 3 of 5 )

    As explained in the previous section, we have two entity related classes, “Product” and “Products.”

    The following is the source code for the “Product” class:


    <DataContract()> _

    Public Class Product


      Private _ProductID As Integer

      Private _ProductName As String

      Private _UnitPrice As Double

      Private _UnitsInStock As Integer

      Private _UnitsOnOrder As Integer


    <DataMember()> _

    Public Property ProductID() As Integer

      Get

       Return _ProductID

      End Get

      Set(ByVal value As Integer)

        _ProductID = value

      End Set

    End Property


    <DataMember()> _

    Public Property ProductName() As String

      Get

       Return _ProductName

      End Get

      Set(ByVal value As String)

       _ProductName = value

      End Set

    End Property


    <DataMember()> _

    Public Property UnitPrice() As Double

      Get

      Return _UnitPrice

      End Get

      Set(ByVal value As Double)

       _UnitPrice = value

      End Set

    End Property


    <DataMember()> _

    Public Property UnitsInStock() As Integer

      Get

       Return _UnitsInStock

      End Get

      Set(ByVal value As Integer)

       _UnitsInStock = value

      End Set

    End Property


    <DataMember()> _

    Public Property UnitsOnOrder() As Integer

      Get

       Return _UnitsOnOrder

      End Get

      Set(ByVal value As Integer)

       _UnitsOnOrder = value

      End Set

    End Property

    End Class

    The following is the source code for the “Products” class:


    Public Class Products

    Inherits List(Of Product)


    End Class

    The “Products” class is very simple (as shown above) as the entire code to handle a collection is defined in the “generic” class “List” in “System.Collections.Generics.”

    More BrainDump Articles
    More By Jagadish Chaterjee


       · Hai,This is my next contribution following a series on WCF programming using...
     

    BRAINDUMP ARTICLES

    - Introduction to Office Live Workspace
    - Using MS Excel for One-way Analysis of Varia...
    - Comparing Data Sets Using Statistical Analys...
    - Import Blogger Posts into WordPress Using Wi...
    - Download WordPress from an FTP Server and Ru...
    - Install and Run WordPress in XAMPP Local Host
    - What Windows 7 Brings to the Table
    - Virtualization and Sandbox Detection
    - Advanced Firebug Techniques in Windows XP Ho...
    - Editing CSS with Firebug in Windows XP Home
    - Using Firebug in Windows XP Home
    - Migrating to Exchange Server 2007
    - Using System Restore on a Non-Bootable PC
    - Finding Logged on Users and More Scripting S...
    - Developing Macro Commands in MS Excel





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    Stay green...Green IT